GDB (xrefs)
|
#include "gdbthread.h"
Classes | |
struct | btrace |
Public Member Functions | |
thread_info (inferior *inf, ptid_t ptid) | |
~thread_info () | |
bool | deletable () const |
void | set_running (bool running) |
const char * | name () const |
void | set_name (gdb::unique_xmalloc_ptr< char > name) |
bool | executing () const |
void | set_executing (bool executing) |
bool | resumed () const |
void | set_resumed (bool resumed) |
void | save_suspend_to (thread_suspend_state &suspend) const |
void | restore_suspend_from (const thread_suspend_state &suspend) |
CORE_ADDR | stop_pc () const |
void | set_stop_pc (CORE_ADDR stop_pc) |
void | clear_stop_pc () |
bool | stop_pc_p () const |
bool | has_pending_waitstatus () const |
const target_waitstatus & | pending_waitstatus () const |
void | set_pending_waitstatus (const target_waitstatus &ws) |
void | clear_pending_waitstatus () |
gdb_signal | stop_signal () const |
void | set_stop_signal (gdb_signal sig) |
target_stop_reason | stop_reason () const |
void | set_stop_reason (target_stop_reason reason) |
struct thread_fsm * | thread_fsm () const |
std::unique_ptr< struct thread_fsm > | release_thread_fsm () |
void | set_thread_fsm (std::unique_ptr< struct thread_fsm > fsm) |
Public Attributes | |
ptid_t | ptid |
int | global_num |
int | per_inf_num |
struct inferior * | inf |
enum thread_state | state = THREAD_STOPPED |
thread_control_state | control |
int | current_line = 0 |
struct symtab * | current_symtab = NULL |
CORE_ADDR | prev_pc = 0 |
int | stepped_breakpoint = 0 |
int | stepping_over_breakpoint = 0 |
int | stepping_over_watchpoint = 0 |
int | step_after_step_resume_breakpoint = 0 |
struct target_waitstatus | pending_follow |
int | stop_requested = 0 |
struct frame_id | initiating_frame = null_frame_id |
std::unique_ptr< private_thread_info > | priv |
bool | stack_temporaries_enabled = false |
std::vector< struct value * > | stack_temporaries |
intrusive_list_node< thread_info > | step_over_list_node |
intrusive_list_node< thread_info > | resumed_with_pending_wait_status_node |
displaced_step_thread_state | displaced_step_state |
Private Attributes | |
bool | m_resumed = false |
bool | m_executing = false |
thread_suspend_state | m_suspend |
gdb::unique_xmalloc_ptr< char > | m_name |
std::unique_ptr< struct thread_fsm > | m_thread_fsm |
Definition at line 244 of file gdbthread.h.
|
explicit |
Definition at line 310 of file thread.c.
References global_num, inferior::highest_thread_num, highest_thread_num, pending_follow, per_inf_num, and target_waitstatus::set_spurious().
thread_info::~thread_info | ( | ) |
Definition at line 324 of file thread.c.
References ptid, and threads_debug_printf.
void thread_info::clear_pending_waitstatus | ( | ) |
Definition at line 389 of file thread.c.
References has_pending_waitstatus(), m_suspend, process_stratum_target::maybe_remove_resumed_with_pending_wait_status(), and thread_suspend_state::waitstatus_pending_p.
Referenced by clear_proceed_status_thread(), do_target_wait_1(), and remote_target::print_one_stopped_thread().
|
inline |
Definition at line 376 of file gdbthread.h.
References m_suspend, and thread_suspend_state::stop_pc.
Referenced by post_create_inferior(), and set_executing().
bool thread_info::deletable | ( | ) | const |
Definition at line 332 of file thread.c.
References is_current_thread().
Referenced by inferior::clear_thread_list(), and delete_thread_1().
|
inline |
Definition at line 316 of file gdbthread.h.
References m_executing.
Referenced by any_live_thread_of_inferior(), can_access_registers_thread(), finish_step_over(), get_bpstat_thread(), get_detach_signal(), has_stack_frames(), notice_new_inferior(), proceed_after_vfork_done(), thread_db_target::update_thread_list(), and validate_registers_access().
|
inline |
Definition at line 391 of file gdbthread.h.
References m_suspend, and thread_suspend_state::waitstatus_pending_p.
Referenced by clear_pending_waitstatus(), clear_proceed_status_thread(), detach_one_lwp(), do_target_wait_1(), get_detach_signal(), process_stratum_target::maybe_add_resumed_with_pending_wait_status(), process_stratum_target::maybe_remove_resumed_with_pending_wait_status(), pending_waitstatus(), remote_target::print_one_stopped_thread(), remote_target::process_initial_stop_replies(), random_pending_event_thread(), resume_1(), resumed_thread_with_pending_status(), set_pending_waitstatus(), and thread_pending_fork_status().
|
inline |
Definition at line 303 of file gdbthread.h.
References m_name.
Referenced by gdb.printing.FlagEnumerationPrinter::__call__(), gdb.disassembler.Disassembler::__init__(), gdb.printing.SubPrettyPrinter::__init__(), gdb.types.TypePrinter::__init__(), gdb.unwinder.Unwinder::__init__(), gdb.xmethod.XMethod::__init__(), gdb.xmethod.XMethodMatcher::__init__(), gdb.printing.PrettyPrinter::__init__(), and thread_name().
|
inline |
Definition at line 400 of file gdbthread.h.
References has_pending_waitstatus(), m_suspend, and thread_suspend_state::waitstatus.
Referenced by clear_proceed_status_thread(), detach_one_lwp(), do_target_wait_1(), get_detach_signal(), remote_target::print_one_stopped_thread(), resume_1(), save_waitstatus(), and thread_pending_fork_status().
|
inline |
Definition at line 458 of file gdbthread.h.
References m_thread_fsm.
Referenced by clear_proceed_status_thread(), follow_fork(), and thread_cancel_execution_command().
|
inline |
Definition at line 351 of file gdbthread.h.
References m_suspend.
Referenced by infcall_suspend_state::restore().
|
inline |
Definition at line 323 of file gdbthread.h.
References m_resumed.
Referenced by keep_going_pass_signal(), process_stratum_target::maybe_add_resumed_with_pending_wait_status(), process_stratum_target::maybe_remove_resumed_with_pending_wait_status(), proceed(), random_pending_event_thread(), and resumed_thread_with_pending_status().
|
inline |
Definition at line 344 of file gdbthread.h.
References m_suspend.
Referenced by infcall_suspend_state::infcall_suspend_state().
void thread_info::set_executing | ( | bool | executing | ) |
Definition at line 342 of file thread.c.
References clear_stop_pc(), and m_executing.
Referenced by handle_one().
|
inline |
Definition at line 311 of file gdbthread.h.
Referenced by thpy_set_name().
void thread_info::set_pending_waitstatus | ( | const target_waitstatus & | ws | ) |
Definition at line 375 of file thread.c.
References has_pending_waitstatus(), m_suspend, process_stratum_target::maybe_add_resumed_with_pending_wait_status(), thread_suspend_state::waitstatus, and thread_suspend_state::waitstatus_pending_p.
Referenced by do_target_wait_1(), remote_target::process_initial_stop_replies(), run_command_1(), and save_waitstatus().
void thread_info::set_resumed | ( | bool | resumed | ) |
Definition at line 352 of file thread.c.
References m_resumed, process_stratum_target::maybe_add_resumed_with_pending_wait_status(), and process_stratum_target::maybe_remove_resumed_with_pending_wait_status().
Referenced by finish_step_over(), handle_one(), keep_going_stepped_thread(), and resume_1().
void thread_info::set_running | ( | bool | running | ) |
Definition at line 856 of file thread.c.
References ptid, set_running_thread(), and gdb::observers::target_resumed.
Referenced by handle_inferior_event(), and remote_target::process_initial_stop_replies().
|
inline |
Definition at line 369 of file gdbthread.h.
References m_suspend, and thread_suspend_state::stop_pc.
Referenced by finish_step_over(), fork_load_infrun_state(), handle_inferior_event(), handle_one(), handle_signal_stop(), handle_syscall_event(), keep_going_stepped_thread(), post_create_inferior(), remote_target::print_one_stopped_thread(), record_btrace_set_replay(), and record_full_goto_entry().
|
inline |
Definition at line 442 of file gdbthread.h.
References m_suspend, and thread_suspend_state::stop_reason.
Referenced by clear_proceed_status_thread(), do_target_wait_1(), and save_waitstatus().
|
inline |
Definition at line 428 of file gdbthread.h.
References m_suspend, and thread_suspend_state::stop_signal.
Referenced by clear_proceed_status_thread(), do_target_resume(), handle_inferior_event(), handle_signal_stop(), keep_going(), linux_nat_resume_callback(), proceed(), remote_target::process_initial_stop_replies(), queue_signal_command(), resume_1(), save_infcall_suspend_state(), and switch_back_to_stepped_thread().
|
inline |
Definition at line 467 of file gdbthread.h.
References m_thread_fsm.
Referenced by finish_command(), follow_fork(), step_1(), until_break_command(), and until_next_command().
|
inline |
Definition at line 361 of file gdbthread.h.
References m_suspend, and thread_suspend_state::stop_pc.
Referenced by do_target_wait_1(), fill_in_stop_func(), finish_step_over(), handle_inferior_event(), handle_one(), handle_signal_stop(), handle_step_into_function(), handle_step_into_function_backward(), handle_syscall_event(), info_program_command(), keep_going_stepped_thread(), print_stop_location(), proceed(), and process_event_stop_test().
|
inline |
Definition at line 384 of file gdbthread.h.
References m_suspend, and thread_suspend_state::stop_pc.
Referenced by proceed().
|
inline |
Definition at line 435 of file gdbthread.h.
References m_suspend, and thread_suspend_state::stop_reason.
Referenced by clear_proceed_status_thread(), and do_target_wait_1().
|
inline |
Definition at line 421 of file gdbthread.h.
References m_suspend, and thread_suspend_state::stop_signal.
Referenced by clear_proceed_status_thread(), elf_none_make_corefile_notes(), fbsd_make_corefile_notes(), finish_step_over(), gcore_find_signalled_thread(), get_detach_signal(), handle_signal_stop(), info_program_command(), keep_going(), keep_going_pass_signal(), linux_make_corefile_notes(), linux_nat_resume_callback(), proceed_after_vfork_done(), python_on_normal_stop(), and switch_back_to_stepped_thread().
|
inline |
Definition at line 449 of file gdbthread.h.
References m_thread_fsm.
Referenced by clean_up_just_stopped_threads_fsms(), fetch_inferior_event(), mi_on_normal_stop_1(), print_stop_event(), should_print_stop_to_console(), step_1(), and thread_cancel_execution_command().
thread_control_state thread_info::control |
Definition at line 340 of file gdbthread.h.
Referenced by remote_target::append_resumption(), arm_linux_copy_svc(), bpstat_clear_actions(), bpstat_do_actions(), bpstat_remove_breakpoint_callback(), breakpoint_about_to_proceed(), clear_proceed_status_thread(), clear_thread_inferior_resources(), continue_command(), currently_stepping(), delete_exception_resume_breakpoint(), delete_single_step_breakpoints(), delete_step_resume_breakpoint(), displaced_step_prepare_throw(), end_stepping_range(), finish_backward(), finish_command(), finish_forward(), finish_step_over(), follow_exec(), follow_fork(), follow_inferior_reset_breakpoints(), handle_inferior_event(), handle_one(), handle_signal_stop(), handle_step_into_function(), handle_step_into_function_backward(), handle_syscall_event(), info_program_command(), inline_frame_is_marked_for_skip(), insert_exception_resume_breakpoint(), insert_exception_resume_from_probe(), insert_longjmp_resume_breakpoint(), insert_single_step_breakpoint(), insert_step_resume_breakpoint_at_sal_1(), keep_going(), keep_going_pass_signal(), keep_going_stepped_thread(), mi_about_to_proceed(), mi_on_resume(), pc_in_thread_step_range(), prepare_one_step(), print_stop_location(), proceed(), process_event_stop_test(), record_btrace_start_replaying(), restore_infcall_control_state(), resume_1(), save_infcall_control_state(), schedlock_applies(), set_step_frame(), set_step_info(), should_print_stop_to_console(), until_break_fsm::should_stop(), step_command_fsm::should_stop(), until_next_fsm::should_stop(), finish_command_fsm::should_stop(), step_command_fsm_prepare(), switch_back_to_stepped_thread(), thread_has_single_step_breakpoint_here(), thread_has_single_step_breakpoints_set(), and until_next_command().
int thread_info::current_line = 0 |
Definition at line 473 of file gdbthread.h.
Referenced by follow_fork(), process_event_stop_test(), and set_step_info().
struct symtab* thread_info::current_symtab = NULL |
Definition at line 474 of file gdbthread.h.
Referenced by follow_fork(), process_event_stop_test(), and set_step_info().
displaced_step_thread_state thread_info::displaced_step_state |
Definition at line 549 of file gdbthread.h.
Referenced by displaced_step_finish(), displaced_step_prepare_throw(), displaced_step_buffers::finish(), and displaced_step_buffers::prepare().
int thread_info::global_num |
Definition at line 290 of file gdbthread.h.
Referenced by annotate_thread_exited(), bpfinishpy_init(), bpstat_check_breakpoint_conditions(), breakpoint_re_set_thread(), check_longjmp_breakpoint_for_call_dummy(), step_command_fsm::clean_up(), finish_command_fsm::clean_up(), clear_thread_inferior_resources(), elf_gnu_ifunc_resolver_stop(), find_condition_and_thread(), handle_signal_stop(), insert_exception_resume_breakpoint(), insert_exception_resume_from_probe(), insert_single_step_breakpoint(), keep_going_pass_signal(), mi_new_thread(), mi_on_normal_stop_1(), mi_output_running(), mi_thread_exit(), mi_user_selected_context_changed(), print_ada_task_info(), print_thread_info_1(), remove_threaded_breakpoints(), resume_1(), set_longjmp_breakpoint(), set_longjmp_breakpoint_for_call_dummy(), should_print_thread(), thpy_get_global_num(), thread_info(), thread_num_make_value_helper(), until_break_command(), until_next_command(), varobj_create(), and watch_command_1().
struct inferior* thread_info::inf |
Definition at line 298 of file gdbthread.h.
Referenced by ada_get_task_number(), annotate_thread_exited(), attach_post_wait(), child_interrupt(), clear_inline_frame_state(), create_thread_object(), delete_thread_1(), delete_thread_object(), displaced_step_finish(), displaced_step_prepare(), displaced_step_prepare_throw(), do_target_resume(), displaced_step_buffers::finish(), follow_fork(), get_ps_regcache(), get_thread_regcache(), handle_inferior_event(), handle_one(), handle_vfork_done(), infrun_thread_thread_exit(), linux_displaced_step_finish(), linux_displaced_step_prepare(), mi_new_thread(), mi_thread_exit(), ppc_displaced_step_finish(), ppc_displaced_step_prepare(), ppc_linux_displaced_step_prepare(), displaced_step_buffers::prepare(), prepare_for_detach(), prepare_one_step(), print_thread_id(), proceed(), proceed_thread_callback(), remote_target::process_initial_stop_replies(), ps_get_thread_area(), ps_pglobal_lookup(), ps_xfer_memory(), process_stratum_target::random_resumed_with_pending_wait_status(), record_btrace_on_new_thread(), record_btrace_replay_at_breakpoint(), registers_changed_thread(), resume_1(), set_thread_exited(), should_print_thread(), switch_to_thread_if_alive(), switch_to_thread_no_regs(), thread_alive(), thread_db_find_new_threads_2(), thread_from_lwp(), thread_name(), thread_to_thread_object(), thread_db_target::update_thread_list(), and use_displaced_stepping().
struct frame_id thread_info::initiating_frame = null_frame_id |
Definition at line 522 of file gdbthread.h.
Referenced by process_event_stop_test(), set_longjmp_breakpoint(), and longjmp_breakpoint::~longjmp_breakpoint().
|
private |
Definition at line 565 of file gdbthread.h.
Referenced by executing(), and set_executing().
|
private |
Definition at line 574 of file gdbthread.h.
Referenced by name(), and set_name().
|
private |
Definition at line 559 of file gdbthread.h.
Referenced by resumed(), and set_resumed().
|
private |
Definition at line 569 of file gdbthread.h.
Referenced by clear_pending_waitstatus(), clear_stop_pc(), has_pending_waitstatus(), pending_waitstatus(), restore_suspend_from(), save_suspend_to(), set_pending_waitstatus(), set_stop_pc(), set_stop_reason(), set_stop_signal(), stop_pc(), stop_pc_p(), stop_reason(), and stop_signal().
|
private |
Definition at line 579 of file gdbthread.h.
Referenced by release_thread_fsm(), set_thread_fsm(), and thread_fsm().
struct target_waitstatus thread_info::pending_follow |
Definition at line 513 of file gdbthread.h.
Referenced by detach_one_lwp(), follow_fork(), follow_fork_inferior(), handle_inferior_event(), remote_target::remote_detach_1(), thread_info(), and thread_pending_fork_status().
int thread_info::per_inf_num |
Definition at line 295 of file gdbthread.h.
Referenced by attach_post_wait(), print_thread_id(), remote_target::process_initial_stop_replies(), should_print_thread(), thpy_get_num(), thread_info(), and thread_num_make_value_helper().
CORE_ADDR thread_info::prev_pc = 0 |
Definition at line 484 of file gdbthread.h.
Referenced by adjust_pc_after_break(), handle_signal_stop(), keep_going_pass_signal(), keep_going_stepped_thread(), proceed(), and process_event_stop_test().
std::unique_ptr<private_thread_info> thread_info::priv |
Definition at line 525 of file gdbthread.h.
Referenced by add_thread_with_info(), check_thread_db_callback(), find_new_threads_callback(), get_aix_thread_info(), get_darwin_thread_info(), get_nto_thread_info(), get_remote_thread_info(), get_thread_db_thread_info(), thread_db_target::get_thread_local_address(), nto_extra_thread_info(), thread_db_target::pid_to_str(), record_thread(), resume_clear_thread_private_info(), remote_target::stopped_by_hw_breakpoint(), remote_target::stopped_by_sw_breakpoint(), remote_target::stopped_by_watchpoint(), remote_target::stopped_data_address(), sync_threadlists(), and update_thread_private_data_name().
ptid_t thread_info::ptid |
Definition at line 256 of file gdbthread.h.
Referenced by ada_get_task_number(), inf_ptrace_target::attach(), bpstat_check_breakpoint_conditions(), btrace_clear(), btrace_disable(), btrace_enable(), btrace_fetch(), btrace_teardown(), clear_inline_frame_state(), clear_proceed_status_thread(), inferior::clear_thread_list(), collect_cores(), delete_thread_1(), displaced_step_prepare_throw(), do_target_wait_1(), ravenscar_thread_target::enable_btrace(), remote_target::enable_btrace(), x86_linux_nat_target::enable_btrace(), aix_thread_target::extra_thread_info(), remote_target::extra_thread_info(), fbsd_core_thread_name(), find_thread_of_process(), displaced_step_buffers::finish(), finish_step_over(), fprint_dummy_frames(), gcmp(), gdbpy_current_recording(), sol_thread_target::get_ada_task_ptid(), get_thread_regcache(), giter_accum(), giter_count(), global_thread_step_over_chain_enqueue(), global_thread_step_over_chain_remove(), handle_one(), record_btrace_target::info_record(), infrun_thread_thread_exit(), internal_resume_ptid(), interrupt_thread_callback(), keep_going_pass_signal(), keep_going_stepped_thread(), process_stratum_target::maybe_add_resumed_with_pending_wait_status(), process_stratum_target::maybe_remove_resumed_with_pending_wait_status(), mi_on_normal_stop_1(), pd_update(), prepare_one_step(), remote_target::print_one_stopped_thread(), proceed_after_vfork_done(), proceed_thread(), ps_getpid(), ps_xfer_memory(), random_pending_event_thread(), record_btrace_cancel_resume(), record_btrace_resume_thread(), registers_changed_thread(), restart_threads(), resume_1(), save_waitstatus(), remote_target::select_thread_for_ambiguous_stop_reply(), set_running(), set_running_thread(), set_sig_thread_cmd(), set_step_frame(), set_step_info(), set_thread_exited(), should_print_thread(), switch_back_to_stepped_thread(), switch_to_thread_no_regs(), sync_threadlists(), thpy_get_ptid(), thread_alive(), thread_change_ptid(), thread_db_find_new_threads_2(), thread_db_find_thread_from_tid(), linux_nat_target::thread_name(), windows_nat_target::thread_name(), nbsd_nat_target::thread_name(), thread_target_id_str(), try_thread_db_load_1(), ravenscar_thread_target::wait(), record_btrace_target::wait(), and ~thread_info().
intrusive_list_node<thread_info> thread_info::resumed_with_pending_wait_status_node |
Definition at line 546 of file gdbthread.h.
Referenced by process_stratum_target::maybe_add_resumed_with_pending_wait_status(), and process_stratum_target::maybe_remove_resumed_with_pending_wait_status().
std::vector<struct value *> thread_info::stack_temporaries |
Definition at line 536 of file gdbthread.h.
Referenced by get_last_thread_stack_temporary(), push_thread_stack_temporary(), and value_in_thread_stack_temporaries().
bool thread_info::stack_temporaries_enabled = false |
Definition at line 532 of file gdbthread.h.
Referenced by push_thread_stack_temporary(), thread_stack_temporaries_enabled_p(), and value_in_thread_stack_temporaries().
enum thread_state thread_info::state = THREAD_STOPPED |
Definition at line 336 of file gdbthread.h.
Referenced by any_live_thread_of_inferior(), can_access_registers_thread(), delete_checkpoint_command(), find_thread_of_process(), gcore_find_signalled_thread(), get_bpstat_thread(), has_stack_frames(), info_program_command(), interrupt_thread_callback(), keep_going_stepped_thread(), mi_cmd_execute(), mi_cmd_var_update_iter(), mi_user_selected_context_changed(), non_exited_thread_filter::operator()(), print_selected_thread_frame(), print_thread_info_1(), proceed_after_vfork_done(), proceed_thread(), proceed_thread_callback(), remote_target::process_initial_stop_replies(), procfs_notice_thread(), record_thread(), remote_target::remote_notice_new_inferior(), set_running_thread(), set_thread_exited(), should_print_thread(), sol_update_thread_list_callback(), thpy_is_exited(), thpy_is_running(), thpy_is_stopped(), thread_alive(), thread_command(), bsd_uthread_target::update_thread_list(), validate_registers_access(), bsd_uthread_target::wait(), and sol_thread_target::wait().
int thread_info::step_after_step_resume_breakpoint = 0 |
Definition at line 508 of file gdbthread.h.
Referenced by handle_signal_stop(), init_thread_stepping_state(), process_event_stop_test(), and resume_1().
intrusive_list_node<thread_info> thread_info::step_over_list_node |
Definition at line 540 of file gdbthread.h.
Referenced by thread_is_in_step_over_chain().
int thread_info::stepped_breakpoint = 0 |
Definition at line 489 of file gdbthread.h.
Referenced by adjust_pc_after_break(), currently_stepping(), init_thread_stepping_state(), process_event_stop_test(), and resume_1().
int thread_info::stepping_over_breakpoint = 0 |
Definition at line 492 of file gdbthread.h.
Referenced by finish_step_over(), handle_signal_stop(), init_thread_stepping_state(), proceed(), process_event_stop_test(), and thread_still_needs_step_over_bp().
int thread_info::stepping_over_watchpoint = 0 |
Definition at line 497 of file gdbthread.h.
Referenced by finish_step_over(), handle_signal_stop(), init_thread_stepping_state(), and thread_still_needs_step_over().
int thread_info::stop_requested = 0 |
Definition at line 516 of file gdbthread.h.
Referenced by clear_proceed_status_thread(), do_target_resume(), follow_exec(), handle_one(), handle_signal_stop(), handle_stop_requested(), linux_nat_filter_event(), linux_nat_stop_lwp(), proceed_after_vfork_done(), and resume_1().