GDB (xrefs)
|
#include "defs.h"
#include "symtab.h"
#include "frame.h"
#include "inferior.h"
#include "gdbsupport/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 "observable.h"
#include "annotate.h"
#include "cli/cli-decode.h"
#include "cli/cli-option.h"
#include "gdbsupport/gdb_regex.h"
#include "cli/cli-utils.h"
#include "thread-fsm.h"
#include "tid-parse.h"
#include <algorithm>
#include "gdbsupport/gdb_optional.h"
#include "inline-frame.h"
#include "stack.h"
Go to the source code of this file.
Classes | |
struct | info_threads_opts |
Macros | |
#define | THREAD_APPLY_OPTION_HELP "\Prints per-inferior thread number and target system's thread id\n\followed by COMMAND output.\n\\n\By default, an error raised during the execution of COMMAND\n\aborts \"thread apply\".\n\\n\Options:\n\%OPTIONS%" |
Typedefs | |
using | qcs_flag_option_def = gdb::option::flag_option_def< qcs_flags > |
Variables | |
bool | debug_threads = false |
static int | highest_thread_num |
static thread_info * | current_thread_ |
static const gdb::option::option_def | info_threads_option_defs [] |
static const gdb::option::flag_option_def | ascending_option_def |
static const gdb::option::option_def | thr_qcs_flags_option_defs [] |
bool | print_thread_events = true |
struct cmd_list_element * | thread_cmd_list = NULL |
static const struct internalvar_funcs | thread_funcs |
static const struct internalvar_funcs | gthread_funcs |
static const struct internalvar_funcs | inferior_thread_count_funcs |
#define THREAD_APPLY_OPTION_HELP "\Prints per-inferior thread number and target system's thread id\n\followed by COMMAND output.\n\\n\By default, an error raised during the execution of COMMAND\n\aborts \"thread apply\".\n\\n\Options:\n\%OPTIONS%" |
void _initialize_thread | ( | ) |
Definition at line 2171 of file thread.c.
Referenced by initialize_all_files().
struct thread_info * add_thread | ( | process_stratum_target * | targ, |
ptid_t | ptid | ||
) |
Definition at line 303 of file thread.c.
References add_thread_with_info().
Referenced by add_to_thread_list(), attach_proc_task_lwp_callback(), do_attach(), fbsd_add_threads(), process_stratum_target::follow_exec(), handle_inferior_event(), handle_one(), gnu_nat_target::inf_validate_procs(), linux_handle_extended_wait(), linux_nat_filter_event(), nbsd_add_threads(), procfs_notice_thread(), remote_target::remote_add_thread(), sol_update_thread_list_callback(), sync_threadlists(), bsd_uthread_target::update_thread_list(), nto_procfs_target::update_thread_list(), obsd_nat_target::update_thread_list(), bsd_uthread_target::wait(), nbsd_nat_target::wait(), obsd_nat_target::wait(), procfs_target::wait(), sol_thread_target::wait(), and fbsd_nat_target::wait_1().
struct thread_info * add_thread_silent | ( | process_stratum_target * | targ, |
ptid_t | ptid | ||
) |
Definition at line 263 of file thread.c.
References delete_thread(), find_inferior_ptid(), find_thread_ptid(), gdb::observers::new_thread, new_thread(), target_ops::shortname(), and threads_debug_printf.
Referenced by remote_target::add_current_inferior_and_thread(), windows_nat_target::add_thread(), add_thread_with_info(), inf_ptrace_target::attach(), bsd_kvm_target_open(), core_target_open(), gnu_nat_target::create_inferior(), go32_nat_target::create_inferior(), inf_ptrace_target::create_inferior(), procfs_target::create_inferior(), gdbsim_target::create_inferior(), process_stratum_target::follow_fork(), gnu_nat_target::inf_validate_procs(), remote_target::remote_add_thread(), and tfile_target_open().
struct thread_info * add_thread_with_info | ( | process_stratum_target * | targ, |
ptid_t | ptid, | ||
private_thread_info * | priv | ||
) |
Definition at line 288 of file thread.c.
References add_thread_silent(), annotate_new_thread(), gdb_printf(), print_thread_events, thread_info::priv, and target_pid_to_str().
Referenced by add_thread(), darwin_nat_target::check_new_threads(), record_thread(), and sync_threadlists().
thread_info * any_live_thread_of_inferior | ( | inferior * | inf | ) |
Definition at line 644 of file thread.c.
References current_inferior(), thread_info::executing(), inferior_ptid, inferior_thread(), inf::pid, thread_info::state, and THREAD_EXITED.
Referenced by handle_vfork_child_exec_or_exit(), mi_cmd_execute(), remote_target::process_initial_stop_replies(), switch_to_program_space_and_thread(), and thread_db_target::update_thread_list().
thread_info * any_thread_of_inferior | ( | inferior * | inf | ) |
Definition at line 629 of file thread.c.
References current_inferior(), inferior_ptid, inferior_thread(), and inf::pid.
Referenced by detach_inferior_command(), inferior_command(), kill_inferior_command(), kill_or_detach(), mi_cmd_remove_inferior(), remote_new_objfile(), run_one_inferior(), and remote_target::start_remote_1().
bool any_thread_p | ( | ) |
Definition at line 578 of file thread.c.
References all_threads().
Referenced by inferior_appeared().
bool can_access_registers_thread | ( | thread_info * | thread | ) |
Definition at line 954 of file thread.c.
References thread_info::executing(), thread_info::state, and THREAD_EXITED.
Referenced by btrace_enable(), and btrace_fetch().
|
static |
Definition at line 171 of file thread.c.
References bpstat_clear(), btrace_teardown(), clear_inline_frame_state(), 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 128 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 109 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 734 of file thread.c.
References all_threads_safe(), delete_thread(), and THREAD_EXITED.
Referenced by inferior_appeared(), thread_select(), fbsd_nat_target::update_thread_list(), linux_nat_target::update_thread_list(), and nbsd_nat_target::update_thread_list().
void delete_single_step_breakpoints | ( | struct thread_info * | tp | ) |
Definition at line 118 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 102 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 | ( | thread_info * | thread | ) |
Definition at line 483 of file thread.c.
References delete_thread_1().
Referenced by add_thread_silent(), darwin_nat_target::check_new_threads(), delete_exited_threads(), exit_lwp(), follow_exec(), keep_going_stepped_thread(), prune_threads(), sync_threadlists(), remote_target::update_thread_list(), nbsd_nat_target::wait(), procfs_target::wait(), and fbsd_nat_target::wait_1().
|
static |
Definition at line 459 of file thread.c.
References thread_info::deletable(), thread_info::inf, thread_info::ptid, set_thread_exited(), inferior::thread_list, and threads_debug_printf.
Referenced by delete_thread(), and delete_thread_silent().
|
static |
Definition at line 92 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 | ( | thread_info * | thread | ) |
Definition at line 489 of file thread.c.
References delete_thread_1().
struct thread_info * find_thread_by_handle | ( | gdb::array_view< const gdb_byte > | handle, |
struct inferior * | inf | ||
) |
Definition at line 542 of file thread.c.
References target_thread_handle_to_thread_info().
Referenced by infpy_thread_from_thread_handle().
struct thread_info * find_thread_global_id | ( | int | global_id | ) |
Definition at line 495 of file thread.c.
References all_threads().
Referenced by breakpoint_kind(), mi_cmd_execute(), mi_cmd_thread_select(), mi_cmd_var_update_iter(), prepare_for_detach(), print_one_breakpoint_location(), value_of_root_1(), and longjmp_breakpoint::~longjmp_breakpoint().
|
static |
Definition at line 505 of file thread.c.
References inf::threads.
Referenced by thread_apply_command().
struct thread_info * find_thread_ptid | ( | inferior * | inf, |
ptid_t | ptid | ||
) |
Definition at line 528 of file thread.c.
Referenced by ravenscar_thread_target::add_active_thread(), ravenscar_thread_target::add_thread(), all_matching_threads_iterator::all_matching_threads_iterator(), remote_target::append_resumption(), gnu_nat_target::attach(), nto_procfs_target::attach(), darwin_nat_target::check_new_threads(), check_thread_db_callback(), continue_command(), remote_target::core_of_thread(), nto_procfs_target::create_inferior(), delete_checkpoint_command(), windows_nat_target::delete_thread(), detach_one_lwp(), windows_nat_target::do_initial_windows_stuff(), do_target_wait_1(), ravenscar_thread_target::enable_btrace(), exit_lwp(), aix_thread_target::fetch_registers(), record_btrace_target::fetch_registers(), find_new_threads_callback(), follow_fork(), follow_fork_inferior(), get_detach_signal(), get_remote_thread_info(), thread_db_target::get_thread_local_address(), handle_inferior_event(), handle_one(), info_program_command(), linux_handle_syscall_trap(), linux_nat_filter_event(), linux_nat_resume_callback(), linux_nat_stop_lwp(), maint_btrace_packet_history_cmd(), mi_on_resume(), thread_db_target::pid_to_str(), print_ada_task_info(), remote_target::process_initial_stop_replies(), procfs_notice_thread(), py_get_event_thread(), record_btrace_target::record_method(), remote_target::remote_detach_1(), remote_target::remote_notice_new_inferior(), aix_thread_target::resume(), ravenscar_thread_target::set_base_thread_from_ravenscar_task(), sol_update_thread_list_callback(), remote_target::start_remote_1(), aix_thread_target::store_registers(), task_apply_all_command(), task_apply_command(), task_command_1(), thread_db_notice_clone(), thread_from_lwp(), bsd_uthread_target::update_thread_list(), nto_procfs_target::update_thread_list(), remote_target::update_thread_list(), bsd_uthread_target::wait(), thread_db_target::wait(), nbsd_nat_target::wait(), procfs_target::wait(), sol_thread_target::wait(), and fbsd_nat_target::wait_1().
struct thread_info * find_thread_ptid | ( | process_stratum_target * | targ, |
ptid_t | ptid | ||
) |
Definition at line 517 of file thread.c.
References find_inferior_ptid(), and find_thread_ptid().
Referenced by add_thread_silent(), find_thread_ptid(), in_thread_list(), switch_to_thread(), and thread_change_ptid().
void finish_thread_state | ( | process_stratum_target * | targ, |
ptid_t | ptid | ||
) |
Definition at line 915 of file thread.c.
References all_non_exited_threads(), set_running_thread(), and gdb::observers::target_resumed.
Referenced by run_inferior_call().
thread_info * first_thread_of_inferior | ( | inferior * | inf | ) |
Definition at line 620 of file thread.c.
Referenced by extended_remote_target::attach(), and core_target_open().
value * get_last_thread_stack_temporary | ( | thread_info * | tp | ) |
Definition at line 780 of file thread.c.
References thread_info::stack_temporaries.
Referenced by call_function_by_hand_dummy().
|
static |
Definition at line 2120 of file thread.c.
References thread_num_make_value_helper().
void global_thread_step_over_chain_enqueue | ( | struct thread_info * | tp | ) |
Definition at line 423 of file thread.c.
References global_thread_step_over_list, infrun_debug_printf, thread_info::ptid, and thread_is_in_step_over_chain().
Referenced by displaced_step_prepare_throw(), handle_one(), keep_going_pass_signal(), proceed(), and start_step_over().
void global_thread_step_over_chain_enqueue_chain | ( | thread_step_over_list && | list | ) |
Definition at line 435 of file thread.c.
References global_thread_step_over_list.
Referenced by start_step_over().
void global_thread_step_over_chain_remove | ( | struct thread_info * | tp | ) |
Definition at line 443 of file thread.c.
References global_thread_step_over_list, infrun_debug_printf, thread_info::ptid, and thread_is_in_step_over_chain().
Referenced by infrun_thread_stop_requested(), prepare_for_detach(), set_running_thread(), and set_thread_exited().
bool in_thread_list | ( | process_stratum_target * | targ, |
ptid_t | ptid | ||
) |
Definition at line 612 of file thread.c.
References find_thread_ptid().
Referenced by fbsd_add_threads(), nbsd_add_threads(), remote_target::remote_notice_new_inferior(), aix_thread_target::thread_alive(), obsd_nat_target::update_thread_list(), bsd_uthread_target::wait(), nbsd_nat_target::wait(), obsd_nat_target::wait(), procfs_target::wait(), and fbsd_nat_target::wait_1().
struct thread_info * inferior_thread | ( | void | ) |
Definition at line 83 of file thread.c.
References current_thread_.
Referenced by any_live_thread_of_inferior(), any_thread_of_inferior(), arm_linux_copy_svc(), attach_post_wait(), bpfinishpy_init(), bpstat_clear_actions(), breakpoint_about_to_proceed(), breakpoint_re_set_thread(), call_function_by_hand_dummy(), clean_up_just_stopped_threads_fsms(), clear_proceed_status(), cli_base_on_normal_stop(), cli_base_on_user_selected_context_changed(), context_switch(), continue_command(), display_current_task_id(), do_target_resume(), dummy_frame_sniffer(), elf_gnu_ifunc_resolver_return_stop(), elf_gnu_ifunc_resolver_stop(), ensure_not_running(), ensure_valid_thread(), expression::evaluate(), execute_command(), fbsd_make_corefile_notes(), fetch_inferior_event(), find_frame_sal(), finish_backward(), finish_command(), finish_forward(), follow_exec(), follow_fork(), follow_fork_inferior(), follow_inferior_reset_breakpoints(), for_each_just_stopped_thread(), fork_load_infrun_state(), frame_inlined_callees(), frame_pop(), frame_show_address(), gcore_find_signalled_thread(), gdbpy_current_recording(), gdbpy_selected_thread(), get_bpstat_thread(), get_call_return_value(), get_current_regcache(), handle_inferior_event(), has_stack_frames(), record_btrace_target::info_record(), inline_frame_sniffer(), insert_exception_resume_breakpoint(), insert_exception_resume_from_probe(), insert_longjmp_resume_breakpoint(), insert_single_step_breakpoint(), insert_step_resume_breakpoint_at_sal_1(), maint_btrace_clear_cmd(), maint_btrace_clear_packet_history_cmd(), maint_info_btrace_cmd(), maybe_print_thread_hit_breakpoint(), mi_about_to_proceed(), mi_cmd_var_update_iter(), mi_on_normal_stop_1(), mi_on_resume(), mi_user_selected_context_changed(), normal_stop(), pop_dummy_frame(), post_create_inferior(), print_selected_thread_frame(), print_signal_received_reason(), print_stop_event(), print_stop_location(), print_thread_info_1(), proceed(), python_on_normal_stop(), queue_signal_command(), record_btrace_frame_sniffer(), record_btrace_set_replay(), record_btrace_tailcall_frame_sniffer(), record_full_goto_entry(), require_btrace_thread(), restore_infcall_control_state(), restore_infcall_suspend_state(), resume(), record_full_target::resume(), remote_target::resume(), resume_1(), run_command_1(), save_infcall_control_state(), save_infcall_suspend_state(), scoped_restore_current_thread::scoped_restore_current_thread(), set_longjmp_breakpoint_for_call_dummy(), set_momentary_breakpoint(), set_std_terminate_breakpoint(), signal_command(), step_1(), stop_context::stop_context(), record_btrace_target::stopped_by_hw_breakpoint(), remote_target::stopped_by_hw_breakpoint(), record_btrace_target::stopped_by_sw_breakpoint(), remote_target::stopped_by_sw_breakpoint(), remote_target::stopped_by_watchpoint(), remote_target::stopped_data_address(), thread_command(), thread_name_command(), thread_num_make_value_helper(), try_thread_db_load_1(), until_break_command(), until_next_command(), validate_registers_access(), varobj_create(), and watchpoint_in_thread_scope().
|
static |
Definition at line 2131 of file thread.c.
References current_inferior(), inferior_ptid, inferior::non_exited_threads(), and value_from_longest().
|
static |
Definition at line 1266 of file thread.c.
References current_uiout, make_info_threads_options_def_group(), print_thread_info_1(), gdb::option::process_options(), gdb::option::PROCESS_OPTIONS_UNKNOWN_IS_ERROR, and info_threads_opts::show_global_ids.
|
static |
Definition at line 1280 of file thread.c.
References completion_tracker::add_completion(), gdb::option::complete_on_all_options(), gdb::option::complete_options(), make_info_threads_options_def_group(), and gdb::option::PROCESS_OPTIONS_UNKNOWN_IS_ERROR.
void init_thread_list | ( | void | ) |
Definition at line 233 of file thread.c.
References all_inferiors(), and highest_thread_num.
Referenced by darwin_nat_target::attach(), nto_procfs_target::detach(), disconnect_command(), inferior_appeared(), nto_procfs_target::mourn_inferior(), and darwin_nat_target::ptrace_him().
|
static |
Definition at line 77 of file thread.c.
References current_thread_.
Referenced by thread_info::deletable(), switch_to_thread(), and thread_try_catch_cmd().
struct thread_info * iterate_over_threads | ( | int(*)(struct thread_info *, void *) | callback, |
void * | data | ||
) |
Definition at line 565 of file thread.c.
References all_threads_safe().
Referenced by continue_1(), delete_breakpoint(), exec_continue(), fbsd_make_corefile_notes(), find_stop_signal(), finish_step_over(), sol_thread_target::get_ada_task_ptid(), mi_cmd_exec_interrupt(), mi_cmd_target_detach(), pd_update(), print_one_inferior(), and sync_threadlists().
|
static |
Definition at line 595 of file thread.c.
References all_non_exited_threads().
Referenced by thread_apply_all_command().
|
inlinestatic |
Definition at line 1254 of file thread.c.
References info_threads_option_defs.
Referenced by info_threads_command(), and info_threads_command_completer().
|
inlinestatic |
Definition at line 1550 of file thread.c.
References ascending_option_def, gdb::option::option_def::def(), flags, and thr_qcs_flags_option_defs.
Referenced by thread_apply_all_command(), and thread_apply_all_command_completer().
|
inlinestatic |
Definition at line 1563 of file thread.c.
References flags, and thr_qcs_flags_option_defs.
Referenced by thread_apply_command(), and thread_apply_command_completer().
|
static |
Definition at line 245 of file thread.c.
References thread_info, and threads_debug_printf.
Referenced by add_thread_silent(), nto_procfs_target::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 972 of file thread.c.
References thread_info::control, 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 1960 of file thread.c.
References ui_out::field_signed(), ui_out::field_string(), get_selected_frame(), 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_base_on_user_selected_context_changed(), frame_command_core(), mi_cmd_thread_select(), mi_user_selected_context_changed(), and thread_command().
const char * print_thread_id | ( | struct thread_info * | thr | ) |
Definition at line 1431 of file thread.c.
References thread_info::inf, inferior::num, thread_info::per_inf_num, and show_inferior_qualified_tids().
Referenced by btrace_clear(), btrace_disable(), btrace_enable(), btrace_fetch(), btrace_teardown(), record_btrace_target::info_record(), 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_resume_thread(), record_btrace_step_thread(), remove_threaded_breakpoints(), signal_command(), thread_apply_command(), thread_command(), thread_find_command(), thread_try_catch_cmd(), and record_btrace_target::wait().
void print_thread_info | ( | struct ui_out * | uiout, |
const char * | requested_threads, | ||
int | pid | ||
) |
Definition at line 1226 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 1044 of file thread.c.
References all_inferiors(), all_threads(), current_inferior(), ui_out::field_signed(), ui_out::field_skip(), ui_out::field_string(), get_selected_frame(), thread_info::global_num, inferior_ptid, inferior_thread(), ui_out::is_mi_like_p(), LOCATION, ui_out::message(), name, inferior::num, pid, print_stack_frame(), print_thread_id(), should_print_thread(), size, thread_info::state, switch_to_inferior_no_thread(), switch_to_thread(), ui_out::table_body(), ui_out::table_header(), target_core_of_thread(), target_extra_thread_info(), target_pid_to_str(), ui_out::text(), THREAD_EXITED, thread_name(), THREAD_RUNNING, thread_target_id_str(), inf::threads, ui_left, and update_thread_list().
Referenced by info_threads_command(), and print_thread_info().
void prune_threads | ( | void | ) |
Definition at line 718 of file thread.c.
References all_threads_safe(), delete_thread(), switch_to_inferior_no_thread(), and thread_alive().
Referenced by gnu_nat_target::create_inferior(), bsd_uthread_target::update_thread_list(), fbsd_nat_target::update_thread_list(), nto_procfs_target::update_thread_list(), obsd_nat_target::update_thread_list(), procfs_target::update_thread_list(), remote_target::update_thread_list(), and sol_thread_target::update_thread_list().
void push_thread_stack_temporary | ( | thread_info * | tp, |
struct value * | v | ||
) |
Definition at line 756 of file thread.c.
References thread_info::stack_temporaries, and thread_info::stack_temporaries_enabled.
Referenced by call_function_by_hand_dummy(), and get_call_return_value().
void set_executing | ( | process_stratum_target * | targ, |
ptid_t | ptid, | ||
bool | executing | ||
) |
Definition at line 880 of file thread.c.
References all_non_exited_threads(), and process_stratum_target::threads_executing.
Referenced by inf_ptrace_target::attach(), attach_proc_task_lwp_callback(), gdb_startup_inferior(), get_thread_current_frame_id(), linux_handle_extended_wait(), mark_non_executing_threads(), remote_target::process_initial_stop_replies(), record_full_wait_1(), remote_target::remote_add_thread(), and target_resume().
void set_resumed | ( | process_stratum_target * | targ, |
ptid_t | ptid, | ||
bool | resumed | ||
) |
Definition at line 819 of file thread.c.
References all_non_exited_threads().
Referenced by mark_non_executing_threads().
void set_running | ( | process_stratum_target * | targ, |
ptid_t | ptid, | ||
bool | running | ||
) |
Definition at line 863 of file thread.c.
References all_non_exited_threads(), set_running_thread(), and gdb::observers::target_resumed.
Referenced by attach_proc_task_lwp_callback(), linux_handle_extended_wait(), prepare_one_step(), proceed(), remote_target::process_initial_stop_replies(), and remote_target::remote_add_thread().
|
static |
Definition at line 829 of file thread.c.
References global_thread_step_over_chain_remove(), thread_info::ptid, thread_info::state, thread_is_in_step_over_chain(), THREAD_RUNNING, THREAD_STOPPED, and threads_debug_printf.
Referenced by finish_thread_state(), thread_info::set_running(), and set_running().
void set_stop_requested | ( | process_stratum_target * | targ, |
ptid_t | ptid, | ||
bool | stop | ||
) |
Definition at line 903 of file thread.c.
References all_non_exited_threads(), and gdb::observers::thread_stop_requested.
Referenced by stop_current_target_threads_ns().
void set_thread_exited | ( | thread_info * | tp, |
bool | silent | ||
) |
Definition at line 195 of file thread.c.
References clear_thread_inferior_resources(), global_thread_step_over_chain_remove(), thread_info::inf, process_stratum_target::maybe_remove_resumed_with_pending_wait_status(), inferior::process_target(), thread_info::ptid, inferior::ptid_thread_map, breakpoint::silent, thread_info::state, gdb::observers::thread_exit, THREAD_EXITED, and thread_is_in_step_over_chain().
Referenced by inferior::clear_thread_list(), and delete_thread_1().
|
static |
Definition at line 989 of file thread.c.
References thread_info::global_num, thread_info::inf, inferior::num, number_is_in_list(), thread_info::per_inf_num, pid, thread_info::ptid, thread_info::state, THREAD_EXITED, and tid_is_in_list().
Referenced by print_thread_info_1().
|
static |
Definition at line 59 of file thread.c.
References gdb_printf().
int show_inferior_qualified_tids | ( | void | ) |
Definition at line 1419 of file thread.c.
References inferior_list.
Referenced by parse_thread_id(), print_thread_id(), and thread_apply_command().
|
static |
Definition at line 1934 of file thread.c.
References gdb_printf().
int show_thread_that_caused_stop | ( | void | ) |
Definition at line 1411 of file thread.c.
References highest_thread_num.
Referenced by maybe_print_thread_hit_breakpoint(), and print_signal_received_reason().
void switch_to_no_thread | ( | ) |
Definition at line 1320 of file thread.c.
References current_thread_, inferior_ptid, reinit_frame_cache(), and threads_debug_printf.
Referenced by remote_target::add_current_inferior_and_thread(), core_target::clear_core(), bsd_kvm_target::close(), tfile_target::close(), core_target_open(), darwin_attach_pid(), gnu_nat_target::detach(), nto_procfs_target::detach(), windows_nat_target::detach(), procfs_target::detach(), inf_ptrace_target::detach_success(), gdbsim_target_open(), generic_mourn_inferior(), handle_vfork_child_exec_or_exit(), mi_cmd_execute(), mi_cmd_remove_inferior(), nto_procfs_target::mourn_inferior(), remote_target::remote_detach_1(), and switch_to_inferior_no_thread().
void switch_to_thread | ( | process_stratum_target * | proc_target, |
ptid_t | ptid | ||
) |
Definition at line 1350 of file thread.c.
References find_thread_ptid(), and switch_to_thread().
void switch_to_thread | ( | thread_info * | thr | ) |
Definition at line 1335 of file thread.c.
References is_current_thread(), reinit_frame_cache(), and switch_to_thread_no_regs().
Referenced by add_to_thread_list(), gnu_nat_target::attach(), inf_ptrace_target::attach(), extended_remote_target::attach(), nto_procfs_target::attach(), attach_post_wait(), bsd_kvm_target_open(), btrace_compute_ftrace_bts(), btrace_fetch(), btrace_read_config(), check_thread_db_callback(), clean_up_just_stopped_threads_fsms(), gdbsim_target::close_one_inferior(), context_switch(), core_target_open(), gnu_nat_target::create_inferior(), go32_nat_target::create_inferior(), inf_ptrace_target::create_inferior(), nto_procfs_target::create_inferior(), procfs_target::create_inferior(), gdbsim_target::create_inferior(), detach_inferior_command(), displaced_step_finish(), displaced_step_prepare_throw(), do_attach(), windows_nat_target::do_initial_windows_stuff(), process_stratum_target::follow_exec(), follow_fork(), follow_fork_inferior(), get_thread_current_frame_id(), handle_inferior_event(), handle_no_resumed(), handle_vfork_child_exec_or_exit(), inferior_command(), darwin_nat_target::init_thread_list(), keep_going_stepped_thread(), kill_inferior_command(), kill_or_detach(), linux_get_siginfo_data(), mi_cmd_execute(), mi_cmd_remove_inferior(), mi_cmd_target_detach(), pdc_read_data(), remote_target::print_one_stopped_thread(), print_thread_info_1(), proceed(), proceed_after_attach(), proceed_after_vfork_done(), proceed_thread(), proceed_thread_callback(), ravenscar_inferior_created(), record_full_wait_1(), remote_new_objfile(), remote_target::remote_notice_new_inferior(), restart_after_all_stop_detach(), restart_threads(), scoped_restore_current_thread::restore(), run_one_inferior(), save_waitstatus(), ravenscar_thread_target::set_base_thread_from_ravenscar_task(), remote_target::start_remote_1(), start_step_over(), startup_inferior(), switch_back_to_stepped_thread(), switch_to_program_space_and_thread(), switch_to_thread(), switch_to_thread_if_alive(), task_command_1(), tfile_target_open(), thpy_switch(), and value_of_root_1().
bool switch_to_thread_if_alive | ( | thread_info * | thr | ) |
Definition at line 697 of file thread.c.
References scoped_restore_current_thread::dont_restore(), thread_info::inf, switch_to_inferior_no_thread(), switch_to_thread(), and thread_alive().
Referenced by task_apply_all_command(), task_apply_command(), thread_apply_all_command(), thread_apply_command(), and thread_select().
void switch_to_thread_no_regs | ( | struct thread_info * | thread | ) |
Definition at line 1303 of file thread.c.
References current_thread_, thread_info::inf, inferior_ptid, thread_info::ptid, set_current_inferior(), set_current_program_space(), and threads_debug_printf.
Referenced by remote_target::add_current_inferior_and_thread(), handle_inferior_event(), handle_one(), notice_new_inferior(), proceed(), remote_target::process_initial_stop_replies(), restart_threads(), stop_all_threads(), and switch_to_thread().
|
static |
Definition at line 1788 of file thread.c.
References execute_command().
|
static |
Definition at line 1799 of file thread.c.
References execute_command().
|
static |
Definition at line 683 of file thread.c.
References current_inferior(), thread_info::inf, thread_info::ptid, thread_info::state, target_thread_alive(), and THREAD_EXITED.
Referenced by prune_threads(), and switch_to_thread_if_alive().
|
static |
Definition at line 1577 of file thread.c.
References all_non_exited_threads(), flags, live_threads_count(), make_thread_apply_all_options_def_group(), gdb::option::process_options(), gdb::option::PROCESS_OPTIONS_UNKNOWN_IS_OPERAND, switch_to_thread_if_alive(), thread_try_catch_cmd(), tp_array_compar_ascending(), tp_array_compar_descending(), update_thread_list(), and validate_flags_qcs().
|
static |
Definition at line 1684 of file thread.c.
References complete_nested_command_line(), gdb::option::complete_options(), make_thread_apply_all_options_def_group(), and gdb::option::PROCESS_OPTIONS_UNKNOWN_IS_OPERAND.
|
static |
Definition at line 1700 of file thread.c.
References tid_range_parser::cur_tok(), current_inferior(), find_inferior_id(), find_thread_id(), tid_range_parser::finished(), flags, tid_range_parser::get_tid(), tid_range_parser::get_tid_range(), tid_range_parser::in_star_range(), tid_range_parser::init(), invalid_thread_id_error(), make_thread_apply_options_def_group(), inferior::num, print_thread_id(), gdb::option::process_options(), gdb::option::PROCESS_OPTIONS_UNKNOWN_IS_OPERAND, show_inferior_qualified_tids(), tid_range_parser::skip_range(), switch_to_thread_if_alive(), thread_try_catch_cmd(), tid_range_parser::tid_is_qualified(), and validate_flags_qcs().
|
static |
Definition at line 1625 of file thread.c.
References completion_tracker::advance_custom_word_point_by(), complete_nested_command_line(), gdb::option::complete_options(), tid_range_parser::cur_tok(), current_inferior(), tid_range_parser::finished(), tid_range_parser::get_tid_range(), tid_range_parser::in_star_range(), tid_range_parser::in_thread_range(), tid_range_parser::init(), make_thread_apply_options_def_group(), inferior::num, gdb::option::PROCESS_OPTIONS_UNKNOWN_IS_OPERAND, completion_tracker::set_use_custom_word_point(), and tid_range_parser::skip_range().
void thread_cancel_execution_command | ( | struct thread_info * | thr | ) |
Definition at line 161 of file thread.c.
References thread_info::release_thread_fsm(), and thread_info::thread_fsm().
Referenced by clear_thread_inferior_resources().
void thread_change_ptid | ( | process_stratum_target * | targ, |
ptid_t | old_ptid, | ||
ptid_t | new_ptid | ||
) |
Definition at line 792 of file thread.c.
References find_inferior_ptid(), find_thread_ptid(), inf::pid, thread_info::ptid, and gdb::observers::thread_ptid_changed.
Referenced by linux_nat_target::attach(), gnu_nat_target::create_inferior(), gnu_nat_target::inf_validate_procs(), linux_nat_switch_fork(), linux_nat_wait_1(), nbsd_add_threads(), procfs_target::procfs_init_inferior(), remote_target::remote_notice_new_inferior(), bsd_uthread_target::update_thread_list(), obsd_nat_target::update_thread_list(), bsd_uthread_target::wait(), nbsd_nat_target::wait(), obsd_nat_target::wait(), and fbsd_nat_target::wait_1().
void thread_command | ( | const char * | tidstr, |
int | from_tty | ||
) |
Definition at line 1811 of file thread.c.
References current_uiout, gdb_printf(), inferior_ptid, inferior_thread(), parse_thread_id(), print_selected_thread_frame(), print_thread_id(), thread_info::state, target_has_stack(), target_pid_to_str(), THREAD_EXITED, thread_select(), gdb::observers::user_selected_context_changed, USER_SELECTED_FRAME, and USER_SELECTED_THREAD.
Referenced by core_target_open().
int thread_count | ( | process_stratum_target * | proc_target | ) |
Definition at line 586 of file thread.c.
References all_threads().
Referenced by core_target_open(), info_mach_threads_command(), maintenance_show_worker_threads(), remote_target::start_remote_1(), and update_global_location_list().
|
static |
Definition at line 1875 of file thread.c.
References all_threads(), gdb_printf(), name, print_thread_id(), re_comp(), switch_to_inferior_no_thread(), target_extra_thread_info(), target_pid_to_str(), target_thread_name(), and update_thread_list().
int thread_has_single_step_breakpoint_here | ( | struct thread_info * | tp, |
const address_space * | aspace, | ||
CORE_ADDR | addr | ||
) |
Definition at line 148 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 140 of file thread.c.
References thread_info::control, and thread_control_state::single_step_breakpoints.
Referenced by adjust_pc_after_break(), record_full_target::resume(), resume_1(), and save_waitstatus().
|
static |
Definition at line 2109 of file thread.c.
References thread_num_make_value_helper().
int thread_is_in_step_over_chain | ( | struct thread_info * | tp | ) |
Definition at line 402 of file thread.c.
References thread_info::step_over_list_node.
Referenced by remote_target::commit_resumed(), global_thread_step_over_chain_enqueue(), global_thread_step_over_chain_remove(), infrun_thread_stop_requested(), proceed(), restart_threads(), resume_1(), set_running_thread(), set_thread_exited(), and start_step_over().
const char * thread_name | ( | thread_info * | thread | ) |
Definition at line 2046 of file thread.c.
References current_inferior(), thread_info::inf, name, thread_info::name(), switch_to_inferior_no_thread(), and target_thread_name().
Referenced by windows_nat::windows_process_info::handle_ms_vc_exception(), maybe_print_thread_hit_breakpoint(), print_signal_received_reason(), print_thread_info_1(), thpy_get_name(), and thread_target_id_str().
|
static |
Definition at line 1859 of file thread.c.
References inferior_ptid, and inferior_thread().
Definition at line 2086 of file thread.c.
References thread_info::global_num, inferior_ptid, inferior_thread(), 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 1945 of file thread.c.
References annotate_thread_changed(), delete_exited_threads(), and switch_to_thread_if_alive().
Referenced by mi_cmd_thread_select(), and thread_command().
bool thread_stack_temporaries_enabled_p | ( | thread_info * | tp | ) |
Definition at line 745 of file thread.c.
References thread_info::stack_temporaries_enabled.
Referenced by call_function_by_hand_dummy(), expression::evaluate(), and get_call_return_value().
const char * thread_state_string | ( | enum thread_state | state | ) |
Definition at line 2064 of file thread.c.
References THREAD_EXITED, THREAD_RUNNING, and THREAD_STOPPED.
Referenced by call_function_by_hand_dummy(), and infrun_debug_show_threads().
int thread_step_over_chain_length | ( | const thread_step_over_list & | l | ) |
Definition at line 410 of file thread.c.
Referenced by start_step_over().
|
static |
Definition at line 1022 of file thread.c.
References name, thread_info::ptid, target_extra_thread_info(), target_pid_to_str(), and thread_name().
Referenced by print_thread_info_1(), and thread_try_catch_cmd().
void thread_try_catch_cmd | ( | thread_info * | thr, |
gdb::optional< int > | ada_task, | ||
const char * | cmd, | ||
int | from_tty, | ||
const qcs_flags & | flags | ||
) |
Definition at line 1471 of file thread.c.
References execute_command_to_string(), flags, gdb_printf(), gdb_stdout, is_current_thread(), print_thread_id(), and thread_target_id_str().
Referenced by task_apply_all_command(), task_apply_command(), thread_apply_all_command(), and thread_apply_command().
bool threads_are_executing | ( | process_stratum_target * | target | ) |
Definition at line 897 of file thread.c.
References process_stratum_target::threads_executing.
Referenced by breakpoints_should_be_inserted_now().
|
static |
Definition at line 1447 of file thread.c.
Referenced by thread_apply_all_command().
|
static |
Definition at line 1460 of file thread.c.
Referenced by thread_apply_all_command().
void update_thread_list | ( | void | ) |
Definition at line 2037 of file thread.c.
References target_update_thread_list(), and update_threads_executing().
Referenced by checkpoint_command(), elf_none_make_corefile_notes(), 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(), task_apply_all_command(), task_apply_command(), thread_apply_all_command(), and thread_find_command().
|
static |
Definition at line 2003 of file thread.c.
References all_non_exited_inferiors(), current_inferior(), inferior::process_target(), and process_stratum_target::threads_executing.
Referenced by update_thread_list().
int valid_global_thread_id | ( | int | global_id | ) |
Definition at line 602 of file thread.c.
References all_threads().
Referenced by bppy_set_thread(), gdbscm_set_breakpoint_thread_x(), and insert_breakpoint_locations().
void validate_registers_access | ( | void | ) |
Definition at line 930 of file thread.c.
References thread_info::executing(), inferior_ptid, inferior_thread(), thread_info::state, and THREAD_EXITED.
Referenced by get_current_frame(), record_btrace_target::info_record(), require_btrace_thread(), siginfo_value_read(), and siginfo_value_write().
bool value_in_thread_stack_temporaries | ( | struct value * | val, |
thread_info * | tp | ||
) |
Definition at line 766 of file thread.c.
References thread_info::stack_temporaries, and thread_info::stack_temporaries_enabled.
Referenced by expression::evaluate().
|
static |
Definition at line 1516 of file thread.c.
Referenced by make_thread_apply_all_options_def_group().
|
static |
Definition at line 72 of file thread.c.
Referenced by inferior_thread(), is_current_thread(), switch_to_no_thread(), and switch_to_thread_no_regs().
|
static |
|
static |
Definition at line 69 of file thread.c.
Referenced by init_thread_list(), show_thread_that_caused_stop(), and thread_info::thread_info().
|
static |
|
static |
Definition at line 1240 of file thread.c.
Referenced by make_info_threads_options_def_group().
bool print_thread_events = true |
Definition at line 1932 of file thread.c.
Referenced by add_thread_with_info(), windows_nat_target::delete_thread(), exit_lwp(), nbsd_nat_target::wait(), procfs_target::wait(), and fbsd_nat_target::wait_1().
|
static |
Definition at line 1529 of file thread.c.
Referenced by make_thread_apply_all_options_def_group(), and make_thread_apply_options_def_group().
struct cmd_list_element* thread_cmd_list = NULL |
Definition at line 2143 of file thread.c.
Referenced by add_thread_commands().
|
static |