This repository has been archived by the owner on Aug 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In my multi-target work, I need to add a few more scoped_restore_current_thread and switch_to_thread calls in some places, and in some lower-level places I was fighting against the fact that switch_to_thread reads/refreshes the stop_pc global. Instead of piling on workarounds, let's just finally eliminate the stop_pc global. We already have the per-thread thread_info->suspend.stop_pc field, so it's mainly a matter of using that more/instead. gdb/ChangeLog: 2018-06-28 Pedro Alves <[email protected]> * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend comments. (switch_to_thread_no_regs): Adjust comment. * infcmd.c (stop_pc): Delete. (post_create_inferior, info_program_command): Replace references to stop_pc with references to thread_info->suspend.stop_pc. * inferior.h (stop_pc): Delete declaration. * infrun.c (proceed, handle_syscall_event, fill_in_stop_func) (handle_inferior_event_1, handle_signal_stop) (process_event_stop_test, keep_going_stepped_thread) (handle_step_into_function, handle_step_into_function_backward) (print_stop_location): Replace references to stop_pc with references to thread_info->suspend.stop_pc. (struct infcall_suspend_state) <stop_pc>: Delete field. (save_infcall_suspend_state, restore_infcall_suspend_state): Remove references to inf_stat->stop_pc. * linux-fork.c (fork_load_infrun_state): Likewise. * record-btrace.c (record_btrace_set_replay): Likewise. * record-full.c (record_full_goto_entry): Likewise. * remote.c (print_one_stopped_thread): Likewise. * target.c (target_resume): Extend comment. * thread.c (set_executing_thread): New. (set_executing): Use it. (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread): Remove references to stop_pc.
- Loading branch information
Showing
11 changed files
with
139 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,31 @@ | ||
2018-06-28 Pedro Alves <[email protected]> | ||
|
||
* gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend | ||
comments. | ||
(switch_to_thread_no_regs): Adjust comment. | ||
* infcmd.c (stop_pc): Delete. | ||
(post_create_inferior, info_program_command): Replace references | ||
to stop_pc with references to thread_info->suspend.stop_pc. | ||
* inferior.h (stop_pc): Delete declaration. | ||
* infrun.c (proceed, handle_syscall_event, fill_in_stop_func) | ||
(handle_inferior_event_1, handle_signal_stop) | ||
(process_event_stop_test, keep_going_stepped_thread) | ||
(handle_step_into_function, handle_step_into_function_backward) | ||
(print_stop_location): Replace references to stop_pc with | ||
references to thread_info->suspend.stop_pc. | ||
(struct infcall_suspend_state) <stop_pc>: Delete field. | ||
(save_infcall_suspend_state, restore_infcall_suspend_state): | ||
Remove references to inf_stat->stop_pc. | ||
* linux-fork.c (fork_load_infrun_state): Likewise. | ||
* record-btrace.c (record_btrace_set_replay): Likewise. | ||
* record-full.c (record_full_goto_entry): Likewise. | ||
* remote.c (print_one_stopped_thread): Likewise. | ||
* target.c (target_resume): Extend comment. | ||
* thread.c (set_executing_thread): New. | ||
(set_executing): Use it. | ||
(switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread): | ||
Remove references to stop_pc. | ||
|
||
2018-06-28 Pedro Alves <[email protected]> | ||
|
||
* infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.