GDB (xrefs)
|
#include "breakpoint.h"
#include "frame.h"
#include "ui-out.h"
#include "inferior.h"
#include "btrace.h"
Go to the source code of this file.
#define ALL_THREADS | ( | T | ) | for (T = thread_list; T; T = T->next) |
Definition at line 317 of file gdbthread.h.
Referenced by append_pending_thread_resumptions(), btrace_free_objfile(), record_btrace_open(), record_btrace_stop_recording(), and thread_apply_all_command().
typedef int(* thread_callback_func)(struct thread_info *, void *) |
Definition at line 312 of file gdbthread.h.
enum thread_state |
Definition at line 34 of file gdbthread.h.
struct thread_info* add_thread | ( | ptid_t | ptid | ) | [read] |
Definition at line 261 of file thread.c.
References add_thread_with_info().
Referenced by add_to_thread_list(), bsd_uthread_find_new_threads(), bsd_uthread_wait(), dec_thread_find_new_threads(), do_attach(), handle_inferior_event(), inf_validate_procs(), linux_child_follow_fork(), linux_handle_extended_wait(), linux_nat_filter_event(), procfs_find_new_threads(), procfs_notice_thread(), procfs_wait(), ravenscar_add_thread(), ravenscar_update_inferior_ptid(), remote_add_thread(), remote_newthread_step(), sol_find_new_threads_callback(), sol_thread_wait(), sync_threadlists(), and windows_add_thread().
struct thread_info* add_thread_silent | ( | ptid_t | ptid | ) | [read] |
Definition at line 196 of file thread.c.
References delete_thread(), find_thread_ptid(), inferior_ptid, new_thread(), null_ptid, observer_notify_new_thread(), thread_info::ptid, ptid_equal(), thread_info::state, switch_to_thread(), THREAD_EXITED, and THREAD_STOPPED.
Referenced by add_current_inferior_and_thread(), add_thread_with_info(), bsd_kvm_open(), core_open(), darwin_attach(), extended_remote_attach_1(), fork_inferior(), gdbsim_create_inferior(), go32_create_inferior(), inf_ptrace_attach(), inf_validate_procs(), m32r_resume(), and monitor_open().
struct thread_info* add_thread_with_info | ( | ptid_t | ptid, |
struct private_thread_info * | |||
) | [read] |
Definition at line 247 of file thread.c.
References _, add_thread_silent(), annotate_new_thread(), print_thread_events, printf_unfiltered(), thread_info::private, and target_pid_to_str().
Referenced by add_thread(), attach_thread(), and darwin_check_new_threads().
struct thread_info* any_live_thread_of_process | ( | int | pid | ) | [read] |
Definition at line 478 of file thread.c.
References thread_info::executing, thread_info::next, thread_info::ptid, ptid_get_pid(), thread_info::state, and THREAD_EXITED.
Referenced by handle_vfork_child_exec_or_exit(), mi_cmd_execute(), reattach_breakpoints(), switch_to_program_space_and_thread(), and thread_db_find_new_threads().
int any_running | ( | void | ) |
Definition at line 651 of file thread.c.
References thread_info::next, thread_info::state, and THREAD_RUNNING.
struct thread_info* any_thread_of_process | ( | int | pid | ) | [read] |
Definition at line 466 of file thread.c.
References thread_info::next, thread_info::ptid, and ptid_get_pid().
Referenced by detach_inferior_command(), dispose_inferior(), have_live_inferiors(), inferior_command(), kill_inferior_command(), kill_or_detach(), mi_cmd_remove_inferior(), and run_one_inferior().
void delete_exception_resume_breakpoint | ( | struct thread_info * | ) |
Definition at line 100 of file thread.c.
References thread_info::control, delete_breakpoint(), and thread_control_state::exception_resume_breakpoint.
Referenced by delete_step_resume_breakpoint_callback(), delete_step_thread_step_resume_breakpoint(), follow_fork(), and handle_inferior_event().
void delete_step_resume_breakpoint | ( | struct thread_info * | ) |
Definition at line 90 of file thread.c.
References thread_info::control, delete_breakpoint(), and thread_control_state::step_resume_breakpoint.
Referenced by delete_step_resume_breakpoint_callback(), delete_step_thread_step_resume_breakpoint(), follow_fork(), and handle_inferior_event().
void delete_thread | ( | ptid_t | ) |
Definition at line 324 of file thread.c.
References delete_thread_1().
Referenced by add_thread_silent(), attach_thread(), darwin_check_new_threads(), delete_thread_of_inferior(), exit_lwp(), handle_inferior_event(), procfs_wait(), prune_threads(), resync_thread_list(), sync_threadlists(), and windows_delete_thread().
void delete_thread_silent | ( | ptid_t | ) |
Definition at line 330 of file thread.c.
References delete_thread_1().
Referenced by bsd_kvm_close(), delete_thread_of_inferior(), gdbsim_mourn_inferior(), go32_mourn_inferior(), m32r_close(), m32r_kill(), m32r_load(), monitor_close(), monitor_mourn_inferior(), and sdireset_command().
struct thread_info* find_thread_id | ( | int | num | ) | [read] |
Definition at line 336 of file thread.c.
References thread_info::next, and thread_info::num.
Referenced by display_tib(), do_captured_thread_select(), longjmp_bkpt_dtor(), mi_cmd_execute(), mi_cmd_var_update_iter(), thread_apply_command(), and thread_id_to_pid().
struct thread_info* find_thread_ptid | ( | ptid_t | ptid | ) | [read] |
Definition at line 349 of file thread.c.
References thread_info::next, thread_info::ptid, and ptid_equal().
Referenced by add_thread_silent(), aix_thread_fetch_registers(), aix_thread_resume(), aix_thread_store_registers(), append_resumption(), attach_thread(), bpstat_clear_actions(), continue_command(), darwin_check_new_threads(), delete_checkpoint_command(), demand_private_info(), detach_thread(), displaced_step_prepare(), do_restore_current_thread_cleanup(), exit_lwp(), find_new_threads_callback(), finish_thread_state(), follow_fork(), get_pending_status(), handle_inferior_event(), inferior_thread(), infrun_thread_stop_requested_callback(), is_executing(), is_thread_state(), linux_handle_extended_wait(), linux_nat_resume_callback(), linux_nat_stop_lwp(), make_cleanup_restore_current_thread(), mi_on_resume(), proceed(), procfs_find_new_threads(), program_info(), python_on_normal_stop(), ravenscar_add_thread(), ravenscar_update_inferior_ptid(), record_btrace_info(), remote_core_of_thread(), remote_threads_extra_info(), require_btrace(), restore_current_thread_cleanup_dtor(), run_inferior_call(), set_executing(), set_running(), set_stop_requested(), task_command_1(), thread_change_ptid(), thread_db_get_thread_local_address(), thread_db_pid_to_str(), thread_get_info_callback(), and thread_id_make_value().
void finish_thread_state | ( | ptid_t | ptid | ) |
Definition at line 718 of file thread.c.
References all, thread_info::executing, find_thread_ptid(), gdb_assert, minus_one_ptid, thread_info::next, observer_notify_target_resumed(), thread_info::ptid, ptid_equal(), ptid_get_pid(), ptid_is_pid(), thread_info::state, THREAD_EXITED, THREAD_RUNNING, and THREAD_STOPPED.
Referenced by finish_thread_state_cleanup().
void finish_thread_state_cleanup | ( | void * | ptid_p | ) |
Definition at line 757 of file thread.c.
References finish_thread_state(), and gdb_assert.
Referenced by fetch_inferior_event(), normal_stop(), prepare_for_detach(), run_command_1(), and wait_for_inferior().
struct thread_info* first_thread_of_process | ( | int | pid | ) | [read] |
Definition at line 453 of file thread.c.
References thread_info::next, thread_info::num, thread_info::ptid, and ptid_get_pid().
Referenced by core_open(), and extended_remote_attach_1().
int in_thread_list | ( | ptid_t | ptid | ) |
Definition at line 438 of file thread.c.
References thread_info::next, thread_info::ptid, and ptid_equal().
Referenced by aix_thread_thread_alive(), breakpoint_re_set_thread(), bsd_uthread_find_new_threads(), bsd_uthread_wait(), check_event(), dec_thread_find_new_threads(), dec_thread_thread_alive(), handle_inferior_event(), procfs_notice_thread(), procfs_wait(), remote_newthread_step(), remote_notice_new_inferior(), set_momentary_breakpoint(), sol_find_new_threads_callback(), sol_thread_wait(), step_1(), and value_of_root_1().
struct thread_info* inferior_thread | ( | void | ) | [read] |
Definition at line 82 of file thread.c.
References find_thread_ptid(), gdb_assert, and inferior_ptid.
Referenced by arm_linux_copy_svc(), attach_command_post_wait(), bpstat_do_actions(), breakpoint_about_to_proceed(), call_function_by_hand(), clear_proceed_status(), delete_step_thread_step_resume_breakpoint(), displaced_step_fixup(), do_initial_windows_stuff(), finish_backward(), finish_command(), finish_command_continuation(), finish_forward(), follow_exec(), follow_fork(), follow_inferior_reset_breakpoints(), gdbtk_annotate_signal(), handle_inferior_event(), inferior_event_handler(), infrun_thread_stop_requested_callback(), insert_exception_resume_breakpoint(), insert_exception_resume_from_probe(), insert_longjmp_resume_breakpoint(), insert_step_resume_breakpoint_at_sal_1(), irix_solib_create_inferior_hook(), linux_child_follow_fork(), mi_about_to_proceed(), mi_execute_command(), mi_on_resume(), normal_stop(), osf_solib_create_inferior_hook(), print_end_stepping_range_reason(), print_signal_received_reason(), proceed(), python_on_normal_stop(), restore_infcall_control_state(), restore_infcall_suspend_state(), resume(), save_infcall_control_state(), save_infcall_suspend_state(), set_step_info(), spu_skip_standalone_loader(), step_1(), step_1_continuation(), step_once(), thread_name_command(), until_break_command(), and until_next_command().
void init_thread_list | ( | void | ) |
Definition at line 155 of file thread.c.
References free_thread(), highest_thread_num, and thread_info::next.
Referenced by core_open(), detach_command(), disconnect_command(), extended_remote_create_inferior_1(), fork_inferior(), gdbsim_create_inferior(), kill_command(), monitor_open(), procfs_detach(), procfs_mourn_inferior(), procfs_open(), remote_open_1(), and windows_init_thread_list().
int is_executing | ( | ptid_t | ptid | ) |
Definition at line 663 of file thread.c.
References thread_info::executing, find_thread_ptid(), and gdb_assert.
Referenced by bpstat_do_actions(), get_current_frame(), get_pending_status(), has_stack_frames(), infrun_thread_stop_requested_callback(), notice_new_inferior(), proceed_after_attach_callback(), proceed_after_vfork_done(), resume_stopped_resumed_lwps(), switch_to_thread(), and watchpoint_in_thread_scope().
Definition at line 639 of file thread.c.
References is_thread_state(), and THREAD_EXITED.
Referenced by bpstat_do_actions(), bsd_uthread_find_new_threads(), bsd_uthread_wait(), clear_proceed_status_callback(), delete_step_resume_breakpoint_callback(), ensure_valid_thread(), find_thread_of_process(), get_current_frame(), handle_inferior_event(), has_stack_frames(), mi_cmd_execute(), print_thread_info(), proceed_after_attach_callback(), procfs_notice_thread(), program_info(), remote_notice_new_inferior(), sol_find_new_threads_callback(), sol_thread_wait(), switch_to_thread(), thpy_is_exited(), thread_command(), and validate_siginfo_access().
int is_running | ( | ptid_t | ptid | ) |
Definition at line 645 of file thread.c.
References is_thread_state(), and THREAD_RUNNING.
Referenced by ensure_not_running(), fetch_inferior_event(), inferior_command(), infrun_thread_stop_requested_callback(), interrupt_thread_callback(), proceed_after_vfork_done(), program_info(), run_inferior_call(), thpy_is_running(), until_break_command(), until_next_command(), and validate_siginfo_access().
int is_stopped | ( | ptid_t | ptid | ) |
Definition at line 633 of file thread.c.
References is_thread_state(), and THREAD_STOPPED.
Referenced by delete_checkpoint_command(), do_restore_current_thread_cleanup(), finish_command_continuation(), make_cleanup_restore_current_thread(), mi_cmd_var_update_iter(), proceed_thread(), proceed_thread_callback(), and thpy_is_stopped().
struct thread_info* iterate_over_threads | ( | thread_callback_func | , |
void * | |||
) | [read] |
Definition at line 375 of file thread.c.
References thread_info::next.
Referenced by clear_proceed_status(), continue_1(), delete_breakpoint(), delete_inferior_1(), delete_step_thread_step_resume_breakpoint(), discard_all_continuations(), discard_all_intermediate_continuations(), do_all_continuations(), do_all_intermediate_continuations(), exec_continue(), exit_inferior_1(), find_stop_signal(), handle_inferior_event(), handle_vfork_child_exec_or_exit(), have_threads(), inf_has_multiple_threads(), infrun_thread_stop_requested(), linux_make_corefile_notes(), mi_cmd_exec_interrupt(), mi_cmd_target_detach(), mi_on_resume(), pd_update(), print_one_inferior(), proceed_after_attach(), remote_start_remote(), resync_thread_list(), sol_get_ada_task_ptid(), sync_threadlists(), and thread_db_get_ada_task_ptid().
struct cleanup* make_cleanup_restore_current_thread | ( | void | ) | [read] |
Definition at line 1161 of file thread.c.
References current_inferior(), do_restore_current_thread_cleanup(), find_thread_ptid(), frame_relative_level(), get_frame_id(), get_selected_frame_if_set(), current_thread_cleanup::inf_id, inferior_ptid, current_thread_cleanup::inferior_ptid, is_stopped(), make_cleanup_dtor(), null_ptid, inferior::num, ptid_equal(), thread_info::refcount, inferior::removable, restore_current_thread_cleanup_dtor(), current_thread_cleanup::selected_frame_id, current_thread_cleanup::selected_frame_level, target_has_memory, target_has_registers, target_has_stack, current_thread_cleanup::was_removable, current_thread_cleanup::was_stopped, and xmalloc().
Referenced by continue_1(), exec_continue(), fetch_inferior_event(), handle_vfork_child_exec_or_exit(), infrun_thread_stop_requested_callback(), mi_cmd_trace_frame_collected(), notice_new_inferior(), print_thread_info(), proceed_after_attach(), save_current_space_and_thread(), thread_apply_all_command(), thread_apply_command(), trace_dump_command(), and value_of_root_1().
int pc_in_thread_step_range | ( | CORE_ADDR | pc, |
struct thread_info * | thread | ||
) |
Definition at line 767 of file thread.c.
References thread_info::control, thread_control_state::step_range_end, and thread_control_state::step_range_start.
Referenced by handle_inferior_event(), and resume().
int pid_to_thread_id | ( | ptid_t | ptid | ) |
Definition at line 415 of file thread.c.
References thread_info::next, thread_info::num, thread_info::ptid, and ptid_equal().
Referenced by bpfinishpy_init(), bpstat_check_breakpoint_conditions(), breakpoint_re_set_thread(), breakpoint_thread_match(), do_captured_thread_select(), elf_gnu_ifunc_resolver_stop(), handle_inferior_event(), inferior_command(), mi_on_normal_stop(), pop_dummy_frame_bpt(), print_ada_task_info(), set_longjmp_breakpoint_for_call_dummy(), set_momentary_breakpoint(), step_1(), thread_command(), and varobj_create().
void print_thread_info | ( | struct ui_out * | uiout, |
char * | threads, | ||
int | pid | ||
) |
Definition at line 785 of file thread.c.
References _, current_thread, do_cleanups(), error(), gdb_assert, get_selected_frame(), inferior_ptid, is_exited(), LOCATION, make_cleanup(), make_cleanup_restore_current_thread(), make_cleanup_ui_out_list_begin_end(), make_cleanup_ui_out_table_begin_end(), make_cleanup_ui_out_tuple_begin_end(), name, thread_info::name, thread_info::next, null_ptid, thread_info::num, number_is_in_list(), print_stack_frame(), thread_info::ptid, ptid_equal(), ptid_get_pid(), thread_info::state, switch_to_thread(), target_core_of_thread(), target_extra_thread_info, target_pid_to_str(), target_thread_name(), THREAD_EXITED, THREAD_RUNNING, ui_left, ui_out_field_int(), ui_out_field_skip(), ui_out_field_string(), ui_out_is_mi_like_p(), ui_out_message(), ui_out_table_body(), ui_out_table_header(), ui_out_text(), update_thread_list(), xfree(), and xstrprintf().
Referenced by info_threads_command(), mi_cmd_list_thread_groups(), mi_cmd_thread_info(), and print_one_inferior().
void set_executing | ( | ptid_t | ptid, |
int | executing | ||
) |
Definition at line 673 of file thread.c.
References all, thread_info::executing, find_thread_ptid(), gdb_assert, minus_one_ptid, thread_info::next, thread_info::ptid, ptid_equal(), ptid_get_pid(), and ptid_is_pid().
Referenced by handle_inferior_event(), linux_handle_extended_wait(), record_full_wait_1(), remote_add_thread(), spu_skip_standalone_loader(), startup_inferior(), and target_resume().
void set_running | ( | ptid_t | ptid, |
int | running | ||
) |
Definition at line 583 of file thread.c.
References all, find_thread_ptid(), gdb_assert, minus_one_ptid, thread_info::next, observer_notify_target_resumed(), thread_info::ptid, ptid_equal(), ptid_get_pid(), ptid_is_pid(), thread_info::state, THREAD_EXITED, THREAD_RUNNING, and THREAD_STOPPED.
Referenced by linux_handle_extended_wait(), remote_add_thread(), resume(), step_once(), and target_resume().
void set_stop_requested | ( | ptid_t | ptid, |
int | stop | ||
) |
Definition at line 693 of file thread.c.
References all, find_thread_ptid(), gdb_assert, minus_one_ptid, thread_info::next, observer_notify_thread_stop_requested(), thread_info::ptid, ptid_equal(), ptid_get_pid(), ptid_is_pid(), and thread_info::stop_requested.
Referenced by interrupt_target_1(), and set_stop_requested_callback().
void switch_to_thread | ( | ptid_t | ptid | ) |
Definition at line 992 of file thread.c.
References find_inferior_pid(), gdb_assert, get_thread_regcache(), arm-linux::inf, inferior_ptid, is_executing(), is_exited(), null_ptid, inferior::pspace, ptid_equal(), ptid_get_pid(), regcache_read_pc(), reinit_frame_cache(), set_current_inferior(), set_current_program_space(), and stop_pc.
Referenced by add_inferior_command(), add_thread_silent(), clone_inferior_command(), context_switch(), core_open(), detach_inferior_command(), dispose_inferior(), do_all_continuations_ptid(), do_captured_thread_select(), follow_fork(), gdbsim_close_inferior(), handle_inferior_event(), handle_vfork_child_exec_or_exit(), inferior_command(), kill_inferior_command(), kill_or_detach(), mi_cmd_execute(), mi_cmd_remove_inferior(), mi_cmd_target_detach(), notice_new_inferior(), prepare_to_proceed(), print_thread_info(), proceed_after_attach_callback(), proceed_after_vfork_done(), proceed_thread(), proceed_thread_callback(), restore_current_thread(), restore_thread_cleanup(), run_one_inferior(), startup_inferior(), switch_to_program_space_and_thread(), task_command_1(), thpy_switch(), thread_apply_all_command(), thread_apply_command(), and value_of_root_1().
void thread_change_ptid | ( | ptid_t | old_ptid, |
ptid_t | new_ptid | ||
) |
Definition at line 565 of file thread.c.
References find_inferior_pid(), find_thread_ptid(), arm-linux::inf, observer_notify_thread_ptid_changed(), inferior::pid, thread_info::ptid, and ptid_get_pid().
Referenced by bsd_uthread_find_new_threads(), bsd_uthread_wait(), darwin_init_thread_list(), gnu_create_inferior(), inf_validate_procs(), linux_nat_attach(), linux_nat_switch_fork(), linux_nat_wait_1(), procfs_init_inferior(), and remote_notice_new_inferior().
int thread_count | ( | void | ) |
Definition at line 391 of file thread.c.
References thread_info::next.
Referenced by info_mach_threads_command(), mi_execute_command(), remote_start_remote(), thread_apply_all_command(), and update_global_location_list().
Definition at line 427 of file thread.c.
References find_thread_id(), pid_to_ptid(), and thread_info::ptid.
Referenced by set_sig_thread_cmd(), and value_of_root_1().
void update_thread_list | ( | void | ) |
Definition at line 1490 of file thread.c.
References prune_threads(), and target_find_new_threads().
Referenced by checkpoint_command(), do_captured_list_thread_ids(), infpy_threads(), mi_cmd_list_thread_groups(), print_thread_info(), thread_apply_all_command(), and thread_find_command().
int valid_thread_id | ( | int | thread | ) |
Definition at line 403 of file thread.c.
References thread_info::next, and thread_info::num.
Referenced by bppy_set_thread(), find_condition_and_thread(), insert_breakpoint_locations(), and watch_command_1().
Definition at line 1427 of file thread.c.
Referenced by add_thread_with_info(), exit_lwp(), procfs_wait(), and windows_delete_thread().
struct cmd_list_element* thread_cmd_list |
struct thread_info* thread_list |
Definition at line 57 of file thread.c.
Referenced by darwin_check_new_threads(), and new_thread().