|
GDB (xrefs)
|
#include "defs.h"#include "symtab.h"#include "frame.h"#include "inferior.h"#include "environ.h"#include "value.h"#include "target.h"#include "gdbthread.h"#include "command.h"#include "gdbcmd.h"#include "regcache.h"#include "btrace.h"#include <ctype.h>#include <sys/types.h>#include <signal.h>#include "ui-out.h"#include "observer.h"#include "annotate.h"#include "cli/cli-decode.h"#include "gdb_regex.h"#include "cli/cli-utils.h"#include "thread-fsm.h"#include "tid-parse.h"#include <algorithm>#include "common/gdb_optional.h"Go to the source code of this file.
Classes | |
| class | scoped_inc_dec_ref |
Variables | |
| struct thread_info * | thread_list = NULL |
| static int | highest_thread_num |
| static int | threads_executing |
| static bool | tp_array_compar_ascending |
| int | print_thread_events = 1 |
| struct cmd_list_element * | thread_cmd_list = NULL |
| static const struct internalvar_funcs | thread_funcs |
| static const struct internalvar_funcs | gthread_funcs |
| void _initialize_thread | ( | void | ) |
Definition at line 2070 of file thread.c.
References _, add_cmd(), add_com_alias(), add_info(), add_prefix_cmd(), add_setshow_boolean_cmd(), class_run, cmdlist, create_internalvar_type_lazy(), gthread_funcs, info_threads_command(), no_class, print_thread_events, setprintlist, show_print_thread_events(), showprintlist, thread_apply_all_command(), thread_apply_command(), thread_cmd_list, thread_command(), thread_find_command(), thread_funcs, and thread_name_command().
| struct thread_info* add_thread | ( | ptid_t | ptid | ) |
Definition at line 333 of file thread.c.
References add_thread_with_info(), and thread_info::ptid.
Referenced by add_to_thread_list(), attach_proc_task_lwp_callback(), bsd_uthread_update_thread_list(), bsd_uthread_wait(), do_attach(), follow_exec(), follow_fork_inferior(), handle_inferior_event_1(), inf_validate_procs(), linux_handle_extended_wait(), linux_nat_filter_event(), procfs_notice_thread(), procfs_update_thread_list(), procfs_wait(), ravenscar_add_thread(), ravenscar_update_inferior_ptid(), remote_add_thread(), sol_thread_wait(), sol_update_thread_list_callback(), stop_all_threads(), sync_threadlists(), and windows_add_thread().
| struct thread_info* add_thread_silent | ( | ptid_t | ptid | ) |
Definition at line 266 of file thread.c.
References delete_thread(), find_inferior_ptid(), find_thread_ptid(), gdb_assert, inferior_ptid, new_thread(), null_ptid, observer_notify_new_thread(), thread_info::ptid, 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(), extended_remote_attach(), gdbsim_create_inferior(), gnu_create_inferior(), go32_create_inferior(), inf_ptrace_attach(), inf_ptrace_create_inferior(), inf_validate_procs(), procfs_create_inferior(), remote_add_thread(), and tfile_open().
| struct thread_info* add_thread_with_info | ( | ptid_t | ptid, |
| private_thread_info * | priv | ||
| ) |
Definition at line 319 of file thread.c.
References _, add_thread_silent(), annotate_new_thread(), print_thread_events, printf_unfiltered(), thread_info::priv, thread_info::ptid, and target_pid_to_str().
Referenced by add_thread(), darwin_check_new_threads(), record_thread(), and sync_threadlists().
| struct thread_info* any_live_thread_of_process | ( | int | pid | ) |
Definition at line 674 of file thread.c.
References ALL_NON_EXITED_THREADS, thread_info::executing, gdb_assert, inferior_ptid, inferior_thread(), pid, thread_info::ptid, ptid_get_pid(), thread_info::state, and THREAD_EXITED.
Referenced by handle_no_resumed(), handle_vfork_child_exec_or_exit(), mi_cmd_execute(), process_initial_stop_replies(), switch_to_program_space_and_thread(), and thread_db_update_thread_list().
| struct thread_info* any_thread_of_process | ( | int | pid | ) |
Definition at line 656 of file thread.c.
References ALL_NON_EXITED_THREADS, gdb_assert, inferior_ptid, inferior_thread(), pid, thread_info::ptid, and ptid_get_pid().
Referenced by detach_inferior_command(), dispose_inferior(), inferior_command(), kill_inferior_command(), kill_or_detach(), mi_cmd_remove_inferior(), and run_one_inferior().
| bool can_access_registers_ptid | ( | ptid_t | ptid | ) |
Definition at line 1123 of file thread.c.
References is_executing(), is_exited(), null_ptid, and thread_info::ptid.
Referenced by btrace_enable(), and btrace_fetch().
|
static |
Definition at line 180 of file thread.c.
References bpstat_clear(), btrace_teardown(), thread_info::control, delete_at_next_stop(), delete_longjmp_breakpoint_at_next_stop(), thread_control_state::exception_resume_breakpoint, thread_info::global_num, thread_control_state::single_step_breakpoints, thread_control_state::step_resume_breakpoint, thread_control_state::stop_bpstat, and thread_cancel_execution_command().
Referenced by set_thread_exited().
|
static |
Definition at line 136 of file thread.c.
References bp, and disp_del_at_next_stop.
Referenced by clear_thread_inferior_resources().
| void delete_exception_resume_breakpoint | ( | struct thread_info * | tp | ) |
Definition at line 117 of file thread.c.
References thread_info::control, delete_thread_breakpoint(), and thread_control_state::exception_resume_breakpoint.
Referenced by delete_thread_infrun_breakpoints(), follow_fork(), and process_event_stop_test().
| void delete_exited_threads | ( | void | ) |
Definition at line 741 of file thread.c.
References ALL_THREADS_SAFE, delete_thread(), thread_info::ptid, thread_info::state, and THREAD_EXITED.
Referenced by linux_nat_update_thread_list().
| void delete_single_step_breakpoints | ( | struct thread_info * | tp | ) |
Definition at line 126 of file thread.c.
References thread_info::control, delete_thread_breakpoint(), and thread_control_state::single_step_breakpoints.
Referenced by delete_just_stopped_threads_single_step_breakpoints(), delete_thread_infrun_breakpoints(), record_full_wait_1(), resume(), and resume_1().
| void delete_step_resume_breakpoint | ( | struct thread_info * | tp | ) |
Definition at line 110 of file thread.c.
References thread_info::control, delete_thread_breakpoint(), and thread_control_state::step_resume_breakpoint.
Referenced by delete_thread_infrun_breakpoints(), follow_fork(), and process_event_stop_test().
| void delete_thread | ( | ptid_t | ptid | ) |
Definition at line 476 of file thread.c.
References delete_thread_1(), and thread_info::ptid.
Referenced by add_thread_silent(), darwin_check_new_threads(), delete_exited_threads(), delete_thread_of_inferior(), exit_lwp(), follow_exec(), keep_going_stepped_thread(), linux_nat_set_delete_thread(), procfs_wait(), prune_threads(), remote_update_thread_list(), sync_threadlists(), and windows_delete_thread().
|
static |
Definition at line 442 of file thread.c.
References thread_info::next, thread_info::ptid, set_thread_exited(), and thread_list.
Referenced by delete_thread(), and delete_thread_silent().
|
static |
Definition at line 100 of file thread.c.
References delete_breakpoint().
Referenced by delete_exception_resume_breakpoint(), delete_single_step_breakpoints(), and delete_step_resume_breakpoint().
| void delete_thread_silent | ( | ptid_t | ptid | ) |
Definition at line 482 of file thread.c.
References delete_thread_1(), and thread_info::ptid.
Referenced by bsd_kvm_close(), delete_thread_of_inferior(), gdbsim_mourn_inferior(), and go32_mourn_inferior().
|
static |
Definition at line 756 of file thread.c.
References find_thread_ptid(), thread_info::stack_temporaries, thread_info::stack_temporaries_enabled, VEC_free, and xfree().
Referenced by enable_thread_stack_temporaries().
Definition at line 774 of file thread.c.
References disable_thread_stack_temporaries(), find_thread_ptid(), gdb_assert, make_cleanup(), thread_info::ptid, thread_info::stack_temporaries, thread_info::stack_temporaries_enabled, and XNEW.
Referenced by evaluate_subexp().
| struct thread_info* find_thread_by_handle | ( | struct value * | thread_handle, |
| struct inferior * | inf | ||
| ) |
Definition at line 528 of file thread.c.
References target_thread_handle_to_thread_info(), TYPE_LENGTH, value_contents_all(), and value_type().
Referenced by infpy_thread_from_thread_handle().
| struct thread_info* find_thread_global_id | ( | int | global_id | ) |
Definition at line 488 of file thread.c.
References thread_info::global_num, thread_info::next, and thread_list.
Referenced by breakpoint_kind(), global_thread_id_to_ptid(), mi_cmd_execute(), mi_cmd_thread_select(), mi_cmd_var_update_iter(), print_one_breakpoint_location(), and longjmp_breakpoint::~longjmp_breakpoint().
|
static |
Definition at line 500 of file thread.c.
References thread_info::inf, thread_info::next, thread_info::per_inf_num, and thread_list.
Referenced by thread_apply_command().
| struct thread_info* find_thread_ptid | ( | ptid_t | ptid | ) |
Definition at line 514 of file thread.c.
References thread_info::next, thread_info::ptid, and thread_list.
Referenced by add_thread_silent(), aix_thread_fetch_registers(), aix_thread_resume(), aix_thread_store_registers(), append_resumption(), bpstat_clear_actions(), btrace_func_from_recpy_func(), btrace_insn_from_recpy_insn(), call_function_by_hand_dummy(), cli_on_user_selected_context_changed(), continue_command(), delete_checkpoint_command(), disable_thread_stack_temporaries(), displaced_step_prepare_throw(), do_target_wait(), enable_thread_stack_temporaries(), exit_lwp(), find_new_threads_callback(), finish_thread_state(), follow_fork(), get_detach_signal(), get_last_thread_stack_temporary(), get_remote_thread_info(), handle_inferior_event_1(), inferior_thread(), info_program_command(), is_executing(), is_thread_state(), linux_nat_resume_callback(), linux_nat_stop_lwp(), maint_btrace_clear_cmd(), maint_btrace_clear_packet_history_cmd(), maint_btrace_packet_history_cmd(), maint_info_btrace_cmd(), mi_on_resume(), mi_on_resume_1(), mi_user_selected_context_changed(), notice_new_inferior(), process_initial_stop_replies(), procfs_update_thread_list(), push_thread_stack_temporary(), python_on_normal_stop(), ravenscar_add_thread(), ravenscar_update_inferior_ptid(), record_btrace_fetch_registers(), record_btrace_frame_sniffer(), record_btrace_info(), record_btrace_record_method(), record_btrace_tailcall_frame_sniffer(), record_btrace_thread_alive(), recpy_bt_begin(), recpy_bt_end(), recpy_bt_format(), recpy_bt_func_level(), recpy_bt_function_call_history(), recpy_bt_goto(), recpy_bt_instruction_history(), recpy_bt_replay_position(), remote_core_of_thread(), remote_detach_1(), remote_threads_extra_info(), require_btrace_thread(), run_inferior_call(), scoped_restore_current_thread::scoped_restore_current_thread(), set_executing(), set_resumed(), set_running(), set_stop_requested(), stop_all_threads(), switch_to_thread(), task_command_1(), thread_change_ptid(), thread_db_get_thread_local_address(), thread_db_pid_to_str(), thread_from_lwp(), thread_num_make_value_helper(), thread_stack_temporaries_enabled_p(), tui_on_user_selected_context_changed(), and value_in_thread_stack_temporaries().
| void finish_thread_state | ( | ptid_t | ptid | ) |
Definition at line 1052 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_get_pid(), ptid_is_pid(), set_running_thread(), thread_info::state, THREAD_EXITED, and thread_list.
Referenced by finish_thread_state_cleanup(), and run_inferior_call().
| void finish_thread_state_cleanup | ( | void * | arg | ) |
Definition at line 1089 of file thread.c.
References finish_thread_state(), and gdb_assert.
Referenced by fetch_inferior_event(), normal_stop(), prepare_for_detach(), proceed(), run_command_1(), and wait_for_inferior().
| struct thread_info* first_thread_of_process | ( | int | pid | ) |
Definition at line 643 of file thread.c.
References thread_info::global_num, thread_info::next, pid, thread_info::ptid, ptid_get_pid(), and thread_list.
Referenced by core_open(), and extended_remote_attach().
Definition at line 842 of file thread.c.
References find_thread_ptid(), gdb_assert, thread_info::ptid, thread_info::stack_temporaries, VEC_empty, and VEC_last.
Referenced by call_function_by_hand_dummy().
|
static |
Definition at line 2042 of file thread.c.
References thread_num_make_value_helper().
| ptid_t global_thread_id_to_ptid | ( | int | global_id | ) |
Definition at line 617 of file thread.c.
References find_thread_global_id(), minus_one_ptid, and thread_info::ptid.
Referenced by value_of_root_1().
| int in_thread_list | ( | ptid_t | ptid | ) |
Definition at line 628 of file thread.c.
References thread_info::next, thread_info::ptid, and thread_list.
Referenced by aix_thread_thread_alive(), breakpoint_re_set_thread(), bsd_uthread_update_thread_list(), bsd_uthread_wait(), procfs_notice_thread(), procfs_wait(), remote_notice_new_inferior(), set_momentary_breakpoint(), sol_thread_wait(), and sol_update_thread_list_callback().
| struct thread_info* inferior_thread | ( | void | ) |
Definition at line 90 of file thread.c.
References find_thread_ptid(), gdb_assert, and inferior_ptid.
Referenced by any_live_thread_of_process(), any_thread_of_process(), arm_linux_copy_svc(), attach_post_wait(), bpstat_do_actions(), breakpoint_about_to_proceed(), call_function_by_hand_dummy(), clear_proceed_status(), cli_on_normal_stop(), do_target_resume(), fbsd_make_corefile_notes(), finish_backward(), finish_command(), finish_forward(), follow_exec(), follow_fork(), follow_fork_inferior(), follow_inferior_reset_breakpoints(), for_each_just_stopped_thread(), handle_inferior_event_1(), insert_exception_resume_breakpoint(), insert_exception_resume_from_probe(), insert_longjmp_resume_breakpoint(), insert_single_step_breakpoint(), insert_step_resume_breakpoint_at_sal_1(), linux_child_follow_fork(), linux_make_corefile_notes(), maybe_print_thread_hit_breakpoint(), mi_about_to_proceed(), mi_execute_command(), mi_on_normal_stop_1(), mi_on_resume(), normal_stop(), prepare_one_step(), print_selected_thread_frame(), print_signal_received_reason(), print_stop_event(), print_stop_location(), print_thread_info_1(), proceed(), process_initial_stop_replies(), python_on_normal_stop(), queue_signal_command(), record_btrace_stopped_by_hw_breakpoint(), record_btrace_stopped_by_sw_breakpoint(), record_full_resume(), remote_follow_fork(), remote_stopped_by_hw_breakpoint(), remote_stopped_by_sw_breakpoint(), remote_stopped_by_watchpoint(), remote_stopped_data_address(), restore_infcall_control_state(), restore_infcall_suspend_state(), resume(), resume_1(), run_command_1(), save_infcall_control_state(), save_infcall_suspend_state(), save_stop_context(), set_step_frame(), set_step_info(), signal_command(), spu_skip_standalone_loader(), step_1(), thread_command(), thread_name_command(), tui_on_normal_stop(), until_break_command(), and until_next_command().
|
static |
Definition at line 1379 of file thread.c.
References check_for_argument(), current_uiout, print_thread_info_1(), and skip_spaces().
Referenced by _initialize_thread().
| void init_thread_list | ( | void | ) |
Definition at line 221 of file thread.c.
References thread_info::deletable(), highest_thread_num, thread_info::next, set_thread_exited(), thread_list, and threads_executing.
Referenced by core_open(), detach_command(), disconnect_command(), extended_remote_create_inferior(), gdbsim_create_inferior(), kill_command(), postfork_hook(), procfs_detach(), procfs_mourn_inferior(), procfs_open_1(), remote_open_1(), and windows_init_thread_list().
| int is_executing | ( | ptid_t | ptid | ) |
Definition at line 981 of file thread.c.
References thread_info::executing, find_thread_ptid(), gdb_assert, and thread_info::ptid.
Referenced by bpstat_do_actions(), can_access_registers_ptid(), get_detach_signal(), get_thread_current_frame(), has_stack_frames(), notice_new_inferior(), proceed_after_attach_callback(), proceed_after_vfork_done(), validate_registers_access(), and watchpoint_in_thread_scope().
| int is_exited | ( | ptid_t | ptid | ) |
Definition at line 969 of file thread.c.
References is_thread_state(), thread_info::ptid, and THREAD_EXITED.
Referenced by bpstat_do_actions(), bsd_uthread_update_thread_list(), bsd_uthread_wait(), can_access_registers_ptid(), ensure_valid_thread(), find_thread_of_process(), has_stack_frames(), info_program_command(), keep_going_stepped_thread(), mi_cmd_execute(), print_thread_info_1(), proceed_after_attach_callback(), procfs_notice_thread(), remote_notice_new_inferior(), sol_thread_wait(), sol_update_thread_list_callback(), thpy_is_exited(), thread_command(), and validate_registers_access().
| int is_running | ( | ptid_t | ptid | ) |
Definition at line 975 of file thread.c.
References is_thread_state(), thread_info::ptid, and THREAD_RUNNING.
Referenced by ensure_not_running(), fetch_inferior_event(), info_program_command(), interrupt_thread_callback(), proceed_after_vfork_done(), and thpy_is_running().
| int is_stopped | ( | ptid_t | ptid | ) |
Definition at line 963 of file thread.c.
References is_thread_state(), thread_info::ptid, and THREAD_STOPPED.
Referenced by delete_checkpoint_command(), mi_cmd_var_update_iter(), proceed_thread(), proceed_thread_callback(), thpy_is_stopped(), and scoped_restore_current_thread::~scoped_restore_current_thread().
|
static |
Definition at line 953 of file thread.c.
References find_thread_ptid(), gdb_assert, thread_info::ptid, and thread_info::state.
Referenced by is_exited(), is_running(), and is_stopped().
| struct thread_info* iterate_over_threads | ( | int(*)(struct thread_info *, void *) | callback, |
| void * | data | ||
| ) |
Definition at line 551 of file thread.c.
References thread_info::next, and thread_list.
Referenced by continue_1(), delete_breakpoint(), delete_inferior(), exec_continue(), exit_inferior_1(), fbsd_make_corefile_notes(), find_stop_signal(), finish_step_over(), handle_vfork_child_exec_or_exit(), inf_has_multiple_threads(), linux_make_corefile_notes(), mi_cmd_exec_interrupt(), mi_cmd_target_detach(), mi_on_resume_1(), pd_update(), print_one_inferior(), proceed_after_attach(), sol_get_ada_task_ptid(), and sync_threadlists().
|
static |
Definition at line 581 of file thread.c.
References ALL_NON_EXITED_THREADS.
Referenced by thread_apply_all_command().
|
static |
Definition at line 247 of file thread.c.
References thread_info::next, thread_info::ptid, thread_info::thread_info(), and thread_list.
Referenced by add_thread_silent(), linux_nat_set_new_thread(), procfs_update_thread_list(), update_thread_private_data(), and update_thread_private_data_name().
| int pc_in_thread_step_range | ( | CORE_ADDR | pc, |
| struct thread_info * | thread | ||
| ) |
Definition at line 1141 of file thread.c.
References thread_info::control, thread_control_state::step_range_end, and thread_control_state::step_range_start.
Referenced by handle_signal_stop(), process_event_stop_test(), and resume_1().
| void print_selected_thread_frame | ( | struct ui_out * | uiout, |
| user_selected_what | selection | ||
| ) |
Definition at line 1942 of file thread.c.
References ui_out::field_int(), ui_out::field_string(), get_selected_frame(), thread_info::global_num, has_stack_frames(), inferior_ptid, inferior_thread(), ui_out::is_mi_like_p(), print_stack_frame_to_uiout(), print_thread_id(), SRC_AND_LOC, thread_info::state, target_pid_to_str(), ui_out::text(), THREAD_RUNNING, USER_SELECTED_FRAME, and USER_SELECTED_THREAD.
Referenced by cli_on_user_selected_context_changed(), frame_command(), mi_cmd_thread_select(), mi_user_selected_context_changed(), thread_command(), and tui_on_user_selected_context_changed().
| const char* print_thread_id | ( | struct thread_info * | thr | ) |
Definition at line 1602 of file thread.c.
References get_print_cell(), thread_info::inf, inferior::num, thread_info::per_inf_num, PRINT_CELL_SIZE, show_inferior_qualified_tids(), and xsnprintf().
Referenced by btrace_clear(), btrace_disable(), btrace_enable(), btrace_fetch(), btrace_teardown(), maybe_print_thread_hit_breakpoint(), print_one_breakpoint_location(), print_selected_thread_frame(), print_signal_received_reason(), print_thread_info_1(), record_btrace_cancel_resume(), record_btrace_info(), record_btrace_resume_thread(), record_btrace_step_thread(), record_btrace_wait(), remove_threaded_breakpoints(), signal_command(), thread_apply_all_command(), thread_apply_command(), thread_command(), and thread_find_command().
| void print_thread_info | ( | struct ui_out * | uiout, |
| char * | requested_threads, | ||
| int | pid | ||
| ) |
Definition at line 1367 of file thread.c.
References pid, and print_thread_info_1().
Referenced by mi_cmd_list_thread_groups(), mi_cmd_thread_info(), and print_one_inferior().
|
static |
Definition at line 1192 of file thread.c.
References _, ALL_THREADS_BY_INFERIOR, current_inferior(), gdb::optional< T >::emplace(), ui_out::field_int(), ui_out::field_skip(), ui_out::field_string(), gdb_assert, get_selected_frame(), thread_info::global_num, arm-linux::inf, inferior_ptid, inferior_thread(), is_exited(), ui_out::is_mi_like_p(), LOCATION, ui_out::message(), name, thread_info::name, thread_info::next, null_ptid, inferior::num, pid, print_stack_frame(), print_thread_id(), thread_info::ptid, ptid_to_global_thread_id(), should_print_thread(), thread_info::state, string, string_printf(), switch_to_thread(), ui_out::table_body(), ui_out::table_header(), target_core_of_thread(), target_extra_thread_info, target_pid_to_str(), target_thread_name(), ui_out::text(), thread_list, THREAD_RUNNING, ui_left, and update_thread_list().
Referenced by info_threads_command(), and print_thread_info().
| void prune_threads | ( | void | ) |
Definition at line 727 of file thread.c.
References ALL_THREADS_SAFE, delete_thread(), thread_info::ptid, and thread_alive().
Referenced by bsd_uthread_update_thread_list(), gnu_create_inferior(), procfs_update_thread_list(), remote_update_thread_list(), sol_update_thread_list(), thread_db_update_thread_list(), and thread_select().
| int ptid_to_global_thread_id | ( | ptid_t | ptid | ) |
Definition at line 605 of file thread.c.
References thread_info::global_num, thread_info::next, thread_info::ptid, and thread_list.
Referenced by bpfinishpy_init(), bpstat_check_breakpoint_conditions(), breakpoint_re_set_thread(), elf_gnu_ifunc_resolver_stop(), handle_signal_stop(), pop_dummy_frame_bpt(), print_ada_task_info(), print_thread_info_1(), set_longjmp_breakpoint_for_call_dummy(), set_momentary_breakpoint(), and varobj_create().
Definition at line 808 of file thread.c.
References find_thread_ptid(), gdb_assert, thread_info::ptid, thread_info::stack_temporaries, thread_info::stack_temporaries_enabled, and VEC_safe_push.
Referenced by get_call_return_value().
|
static |
Definition at line 1454 of file thread.c.
References _, current_uiout, find_relative_frame(), frame_find_by_id(), frame_id_eq(), gdb_assert, get_current_frame(), get_frame_id(), get_selected_frame(), print_stack_frame(), select_frame(), SRC_AND_LOC, and warning().
Referenced by scoped_restore_current_thread::~scoped_restore_current_thread().
| void set_executing | ( | ptid_t | ptid, |
| int | executing | ||
| ) |
Definition at line 991 of file thread.c.
References all, thread_info::executing, find_thread_ptid(), gdb_assert, minus_one_ptid, thread_info::next, thread_info::ptid, ptid_get_pid(), ptid_is_pid(), thread_list, and threads_executing.
Referenced by attach_proc_task_lwp_callback(), gdb_startup_inferior(), get_thread_current_frame(), handle_inferior_event_1(), linux_handle_extended_wait(), process_initial_stop_replies(), record_full_wait_1(), remote_add_thread(), spu_skip_standalone_loader(), and target_resume().
| void set_resumed | ( | ptid_t | ptid, |
| int | resumed | ||
| ) |
Definition at line 875 of file thread.c.
References all, find_thread_ptid(), gdb_assert, minus_one_ptid, thread_info::next, thread_info::ptid, ptid_get_pid(), ptid_is_pid(), thread_info::resumed, and thread_list.
Referenced by handle_inferior_event_1().
| void set_running | ( | ptid_t | ptid, |
| int | running | ||
| ) |
Definition at line 919 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_get_pid(), ptid_is_pid(), set_running_thread(), thread_info::state, THREAD_EXITED, and thread_list.
Referenced by attach_proc_task_lwp_callback(), handle_inferior_event_1(), linux_handle_extended_wait(), prepare_one_step(), proceed(), process_initial_stop_replies(), and remote_add_thread().
|
static |
Definition at line 898 of file thread.c.
References thread_info::state, thread_info::step_over_next, THREAD_RUNNING, thread_step_over_chain_remove(), and THREAD_STOPPED.
Referenced by finish_thread_state(), and set_running().
| void set_stop_requested | ( | ptid_t | ptid, |
| int | stop | ||
| ) |
Definition at line 1027 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_get_pid(), ptid_is_pid(), thread_info::stop_requested, and thread_list.
Referenced by interrupt_target_1().
|
static |
Definition at line 202 of file thread.c.
References clear_thread_inferior_resources(), observer_notify_thread_exit(), breakpoint::silent, thread_info::state, thread_info::step_over_next, THREAD_EXITED, and thread_step_over_chain_remove().
Referenced by delete_thread_1(), and init_thread_list().
|
static |
Definition at line 1158 of file thread.c.
References _, error(), thread_info::global_num, thread_info::inf, inferior::num, number_is_in_list(), thread_info::per_inf_num, pid, thread_info::ptid, ptid_get_pid(), thread_info::state, THREAD_EXITED, and tid_is_in_list().
Referenced by print_thread_info_1().
| int show_inferior_qualified_tids | ( | void | ) |
Definition at line 1594 of file thread.c.
References inferior_list, inferior::next, and inferior::num.
Referenced by parse_thread_id(), print_thread_id(), and thread_apply_command().
|
static |
Definition at line 1914 of file thread.c.
References _, and fprintf_filtered().
Referenced by _initialize_thread().
| int show_thread_that_caused_stop | ( | void | ) |
Definition at line 1586 of file thread.c.
References highest_thread_num.
Referenced by maybe_print_thread_hit_breakpoint(), and print_signal_received_reason().
|
static |
Definition at line 362 of file thread.c.
References gdb_assert, thread_info::step_over_next, and thread_info::step_over_prev.
Referenced by thread_step_over_chain_enqueue().
|
static |
Definition at line 387 of file thread.c.
References gdb_assert, thread_info::step_over_next, and thread_info::step_over_prev.
Referenced by thread_step_over_chain_remove().
|
static |
Definition at line 1410 of file thread.c.
References inferior_ptid, null_ptid, reinit_frame_cache(), and stop_pc.
Referenced by switch_to_thread(), and scoped_restore_current_thread::~scoped_restore_current_thread().
|
static |
Definition at line 1423 of file thread.c.
References thread_info::executing, gdb_assert, get_thread_regcache(), inferior_ptid, thread_info::ptid, regcache_read_pc(), reinit_frame_cache(), thread_info::state, stop_pc, switch_to_thread_no_regs(), and THREAD_EXITED.
Referenced by add_thread_silent(), print_thread_info_1(), switch_to_thread(), thread_apply_all_command(), thread_apply_command(), thread_select(), and scoped_restore_current_thread::~scoped_restore_current_thread().
| void switch_to_thread | ( | ptid_t | ptid | ) |
Definition at line 1445 of file thread.c.
References find_thread_ptid(), null_ptid, switch_to_no_thread(), and switch_to_thread().
Referenced by add_inferior_command(), attach_post_wait(), clean_up_just_stopped_threads_fsms(), clone_inferior_command(), context_switch(), core_open(), detach_inferior_command(), displaced_step_fixup(), dispose_inferior(), follow_fork(), gdbsim_close_inferior(), handle_inferior_event_1(), handle_vfork_child_exec_or_exit(), inferior_command(), keep_going_stepped_thread(), kill_inferior_command(), kill_or_detach(), mi_cmd_execute(), mi_cmd_remove_inferior(), mi_cmd_target_detach(), print_one_stopped_thread(), proceed(), proceed_after_attach_callback(), proceed_after_vfork_done(), proceed_thread(), proceed_thread_callback(), restart_threads(), run_one_inferior(), start_step_over(), startup_inferior(), switch_to_program_space_and_thread(), switch_to_thread_cleanup(), task_command_1(), thpy_switch(), and value_of_root_1().
| void switch_to_thread_no_regs | ( | struct thread_info * | thread | ) |
Definition at line 1396 of file thread.c.
References thread_info::inf, inferior_ptid, thread_info::ptid, set_current_inferior(), set_current_program_space(), and stop_pc.
Referenced by add_current_inferior_and_thread(), handle_inferior_event_1(), notice_new_inferior(), process_initial_stop_replies(), stop_all_threads(), and switch_to_thread().
|
static |
Definition at line 715 of file thread.c.
References thread_info::ptid, thread_info::state, target_thread_alive(), and THREAD_EXITED.
Referenced by prune_threads(), thread_apply_all_command(), thread_apply_command(), and thread_select().
|
static |
Definition at line 1648 of file thread.c.
References _, ALL_NON_EXITED_THREADS, check_for_argument(), error(), execute_command(), gdb_assert, inferior_ptid, live_threads_count(), print_thread_id(), printf_filtered(), skip_spaces(), switch_to_thread(), target_pid_to_str(), thread_alive(), tp_array_compar(), tp_array_compar_ascending, and update_thread_list().
Referenced by _initialize_thread().
|
static |
Definition at line 1709 of file thread.c.
References _, tid_range_parser::cur_tok(), current_inferior(), error(), execute_command(), find_inferior_id(), find_thread_id(), tid_range_parser::finished(), tid_range_parser::get_tid(), tid_range_parser::get_tid_range(), tid_range_parser::in_star_range(), arm-linux::inf, inferior_ptid, tid_range_parser::init(), invalid_thread_id_error(), print_thread_id(), printf_filtered(), thread_info::ptid, show_inferior_qualified_tids(), tid_range_parser::skip_range(), switch_to_thread(), target_pid_to_str(), thread_alive(), tid_range_parser::tid_is_qualified(), and warning().
Referenced by _initialize_thread().
| void thread_cancel_execution_command | ( | struct thread_info * | thr | ) |
Definition at line 169 of file thread.c.
References thread_info::thread_fsm, thread_fsm_clean_up(), and thread_fsm_delete().
Referenced by clear_thread_inferior_resources().
Definition at line 855 of file thread.c.
References find_inferior_ptid(), find_thread_ptid(), arm-linux::inf, observer_notify_thread_ptid_changed(), inf::pid, thread_info::ptid, and ptid_get_pid().
Referenced by bsd_uthread_update_thread_list(), bsd_uthread_wait(), 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().
| void thread_command | ( | const char * | tidstr, |
| int | from_tty | ||
| ) |
Definition at line 1795 of file thread.c.
References _, current_uiout, error(), inferior_ptid, inferior_thread(), is_exited(), null_ptid, observer_notify_user_selected_context_changed(), parse_thread_id(), print_selected_thread_frame(), print_thread_id(), printf_filtered(), target_has_stack, target_pid_to_str(), thread_select(), USER_SELECTED_FRAME, and USER_SELECTED_THREAD.
Referenced by _initialize_thread(), and core_open().
| int thread_count | ( | void | ) |
Definition at line 567 of file thread.c.
References thread_info::next, and thread_list.
Referenced by core_open(), info_mach_threads_command(), mi_execute_command(), remote_start_remote(), and update_global_location_list().
|
static |
Definition at line 1860 of file thread.c.
References _, error(), thread_info::name, thread_info::next, print_thread_id(), printf_filtered(), thread_info::ptid, re_comp(), target_extra_thread_info, target_pid_to_str(), target_thread_name(), thread_list, and update_thread_list().
Referenced by _initialize_thread().
| int thread_has_single_step_breakpoint_here | ( | struct thread_info * | tp, |
| const address_space * | aspace, | ||
| CORE_ADDR | addr | ||
| ) |
Definition at line 156 of file thread.c.
References breakpoint_has_location_inserted_here(), thread_info::control, and thread_control_state::single_step_breakpoints.
Referenced by handle_signal_stop().
| int thread_has_single_step_breakpoints_set | ( | struct thread_info * | tp | ) |
Definition at line 148 of file thread.c.
References thread_info::control, and thread_control_state::single_step_breakpoints.
Referenced by adjust_pc_after_break(), record_full_resume(), resume_1(), and save_waitstatus().
|
static |
Definition at line 2031 of file thread.c.
References thread_num_make_value_helper().
| int thread_is_in_step_over_chain | ( | struct thread_info * | tp | ) |
Definition at line 418 of file thread.c.
References thread_info::step_over_next.
Referenced by infrun_thread_stop_requested(), proceed(), remote_commit_resume(), restart_threads(), and resume_1().
|
static |
Definition at line 1843 of file thread.c.
References _, error(), inferior_ptid, inferior_thread(), thread_info::name, null_ptid, skip_spaces(), and xfree().
Referenced by _initialize_thread().
Definition at line 2011 of file thread.c.
References find_thread_ptid(), selftests::scoped_restore_tests::global, thread_info::global_num, inferior_ptid, thread_info::per_inf_num, and value_from_longest().
Referenced by global_thread_id_make_value(), and thread_id_per_inf_num_make_value().
| void thread_select | ( | const char * | tidstr, |
| thread_info * | tp | ||
| ) |
Definition at line 1925 of file thread.c.
References _, annotate_thread_changed(), error(), prune_threads(), thread_info::ptid, switch_to_thread(), and thread_alive().
Referenced by mi_cmd_thread_select(), and thread_command().
| int thread_stack_temporaries_enabled_p | ( | ptid_t | ptid | ) |
Definition at line 795 of file thread.c.
References find_thread_ptid(), thread_info::ptid, and thread_info::stack_temporaries_enabled.
Referenced by call_function_by_hand_dummy(), evaluate_subexp(), and get_call_return_value().
| void thread_step_over_chain_enqueue | ( | struct thread_info * | tp | ) |
Definition at line 426 of file thread.c.
References step_over_chain_enqueue(), and step_over_queue_head.
Referenced by displaced_step_prepare_throw(), keep_going_pass_signal(), proceed(), and stop_all_threads().
| struct thread_info* thread_step_over_chain_next | ( | struct thread_info * | tp | ) |
Definition at line 408 of file thread.c.
References thread_info::next, thread_info::step_over_next, and step_over_queue_head.
Referenced by start_step_over().
| void thread_step_over_chain_remove | ( | struct thread_info * | tp | ) |
Definition at line 434 of file thread.c.
References step_over_chain_remove(), and step_over_queue_head.
Referenced by infrun_thread_stop_requested(), set_running_thread(), set_thread_exited(), and start_step_over().
| int threads_are_executing | ( | void | ) |
Definition at line 1021 of file thread.c.
References threads_executing.
Referenced by breakpoints_should_be_inserted_now().
|
static |
Definition at line 1623 of file thread.c.
References thread_info::inf, inferior::num, thread_info::per_inf_num, and tp_array_compar_ascending.
Referenced by thread_apply_all_command().
| void update_thread_list | ( | void | ) |
Definition at line 2000 of file thread.c.
References target_update_thread_list(), and update_threads_executing().
Referenced by checkpoint_command(), fbsd_make_corefile_notes(), handle_no_resumed(), infpy_threads(), linux_make_corefile_notes(), mi_cmd_list_thread_groups(), mi_cmd_thread_list_ids(), normal_stop(), print_thread_info_1(), restart_threads(), stop_all_threads(), thread_apply_all_command(), and thread_find_command().
|
static |
Definition at line 1984 of file thread.c.
References ALL_NON_EXITED_THREADS, thread_info::executing, and threads_executing.
Referenced by update_thread_list().
| int valid_global_thread_id | ( | int | global_id | ) |
Definition at line 593 of file thread.c.
References thread_info::global_num, thread_info::next, and thread_list.
Referenced by bppy_set_thread(), gdbscm_set_breakpoint_thread_x(), and insert_breakpoint_locations().
| void validate_registers_access | ( | void | ) |
Definition at line 1101 of file thread.c.
References _, error(), inferior_ptid, is_executing(), is_exited(), and null_ptid.
Referenced by get_current_frame(), record_btrace_info(), require_btrace_thread(), siginfo_value_read(), and siginfo_value_write().
Definition at line 820 of file thread.c.
References find_thread_ptid(), gdb_assert, thread_info::ptid, thread_info::stack_temporaries, thread_info::stack_temporaries_enabled, VEC_empty, and VEC_iterate.
Referenced by evaluate_subexp().
|
static |
Definition at line 2062 of file thread.c.
Referenced by _initialize_thread().
|
static |
Definition at line 54 of file thread.c.
Referenced by init_thread_list(), show_thread_that_caused_stop(), and thread_info::thread_info().
| int print_thread_events = 1 |
Definition at line 1912 of file thread.c.
Referenced by _initialize_thread(), add_thread_with_info(), exit_lwp(), procfs_wait(), and windows_delete_thread().
| struct cmd_list_element* thread_cmd_list = NULL |
Definition at line 2049 of file thread.c.
Referenced by _initialize_thread(), and add_thread_commands().
|
static |
Definition at line 2053 of file thread.c.
Referenced by _initialize_thread().
| struct thread_info* thread_list = NULL |
Definition at line 53 of file thread.c.
Referenced by darwin_check_new_threads(), delete_thread_1(), find_thread_global_id(), find_thread_id(), find_thread_ptid(), finish_thread_state(), first_thread_of_process(), in_thread_list(), init_thread_list(), iterate_over_threads(), new_thread(), print_thread_info_1(), ptid_to_global_thread_id(), remote_start_remote(), set_executing(), set_resumed(), set_running(), set_stop_requested(), thread_count(), thread_find_command(), and valid_global_thread_id().
|
static |
Definition at line 61 of file thread.c.
Referenced by init_thread_list(), set_executing(), threads_are_executing(), and update_threads_executing().
|
static |
Definition at line 1616 of file thread.c.
Referenced by thread_apply_all_command(), and tp_array_compar().
1.8.14