GDB (xrefs)

Classes | Macros | Typedefs | Enumerations | Functions | Variables
/tmp/gdb-8.1/gdb/gdbthread.h File Reference
`#include "breakpoint.h"`
`#include "frame.h"`
`#include "ui-out.h"`
`#include "inferior.h"`
`#include "btrace.h"`
`#include "common/vec.h"`
`#include "target/waitstatus.h"`
`#include "cli/cli-utils.h"`
`#include "common/refcounted-object.h"`
`#include "common-gdbthread.h"`

Go to the source code of this file.

## Classes
struct | thread_control_state
struct | thread_suspend_state
struct | private_thread_info
class | thread_info
struct | thread_info::btrace
class | scoped_restore_current_thread

## Macros
#define | ALL_THREADS(T) for (T = thread_list; T; T = T->next) \
#define | ALL_THREADS_BY_INFERIOR(inf, tp)
#define | ALL_NON_EXITED_THREADS(T)
#define | ALL_THREADS_SAFE(T, TMP)

## Typedefs
typedef struct value * | value_ptr
typedef int(* | thread_callback_func) (struct thread_info *, void *)

## Enumerations
enum | thread_state { THREAD_STOPPED, THREAD_RUNNING, THREAD_EXITED }

## Functions
| DEF_VEC_P (value_ptr)
typedef | VEC (value_ptr) value_vec
void | init_thread_list (void)
struct thread_info * | add_thread (ptid_t ptid)
struct thread_info * | add_thread_silent (ptid_t ptid)
struct thread_info * | add_thread_with_info (ptid_t ptid, struct private_thread_info *)
void | delete_thread (ptid_t)
void | delete_thread_silent (ptid_t)
void | delete_step_resume_breakpoint (struct thread_info *)
void | delete_exception_resume_breakpoint (struct thread_info *)
void | delete_single_step_breakpoints (struct thread_info *tp)
int | thread_has_single_step_breakpoints_set (struct thread_info *tp)
int | thread_has_single_step_breakpoint_here (struct thread_info *tp, const address_space *aspace, CORE_ADDR addr)
ptid_t | global_thread_id_to_ptid (int num)
int | ptid_to_global_thread_id (ptid_t ptid)
int | show_inferior_qualified_tids (void)
const char * | print_thread_id (struct thread_info *thr)
int | in_thread_list (ptid_t ptid)
int | valid_global_thread_id (int global_id)
struct thread_info * | find_thread_ptid (ptid_t ptid)
struct thread_info * | find_thread_global_id (int global_id)
struct thread_info * | find_thread_by_handle (struct value *thread_handle, struct inferior *inf)
struct thread_info * | first_thread_of_process (int pid)
struct thread_info * | any_thread_of_process (int pid)
struct thread_info * | any_live_thread_of_process (int pid)
void | thread_change_ptid (ptid_t old_ptid, ptid_t new_ptid)
struct thread_info * | iterate_over_threads (thread_callback_func, void *)
int | thread_count (void)
void | switch_to_thread_no_regs (struct thread_info *thread)
void | set_resumed (ptid_t ptid, int resumed)
void | set_running (ptid_t ptid, int running)
void | set_stop_requested (ptid_t ptid, int stop)
int | is_running (ptid_t ptid)
int | is_exited (ptid_t ptid)
int | is_stopped (ptid_t ptid)
void | set_executing (ptid_t ptid, int executing)
int | is_executing (ptid_t ptid)
int | threads_are_executing (void)
void | finish_thread_state (ptid_t ptid)
void | finish_thread_state_cleanup (void *ptid_p)
void | thread_command (const char *tidstr, int from_tty)
void | print_thread_info (struct ui_out *uiout, char *requested_threads, int pid)
struct thread_info * | inferior_thread (void)
void | update_thread_list (void)
void | prune_threads (void)
void | delete_exited_threads (void)
int | pc_in_thread_step_range (CORE_ADDR pc, struct thread_info *thread)
struct cleanup * | enable_thread_stack_temporaries (ptid_t ptid)
int | thread_stack_temporaries_enabled_p (ptid_t ptid)
void | push_thread_stack_temporary (ptid_t ptid, struct value *v)
struct value * | get_last_thread_stack_temporary (ptid_t)
int | value_in_thread_stack_temporaries (struct value *, ptid_t)
void | thread_step_over_chain_enqueue (struct thread_info *tp)
void | thread_step_over_chain_remove (struct thread_info *tp)
struct thread_info * | thread_step_over_chain_next (struct thread_info *tp)
int | thread_is_in_step_over_chain (struct thread_info *tp)
void | thread_cancel_execution_command (struct thread_info *thr)
void | validate_registers_access (void)
bool | can_access_registers_ptid (ptid_t ptid)
int | show_thread_that_caused_stop (void)
void | print_selected_thread_frame (struct ui_out *uiout, user_selected_what selection)
void | thread_select (const char *tidstr, class thread_info *thr)

## Variables
struct cmd_list_element * | thread_cmd_list
int | print_thread_events
struct thread_info * | thread_list

## Macro Definition Documentation

## ◆ ALL_NON_EXITED_THREADS

#define ALL_NON_EXITED_THREADS | ( |  | T | ) |

Value:
for (T = thread_list; T; T = T->next) \
if ((T)->state != THREAD_EXITED)
THREAD_EXITED
Definition: gdbthread.h:43
thread_info::next
struct thread_info * next
Definition: gdbthread.h:218
thread_list
struct thread_info * thread_list
Definition: thread.c:53

Definition at line 490 of file gdbthread.h.

Referenced by any_live_thread_of_process(), any_thread_of_process(), append_pending_thread_resumptions(), attach_post_wait(), breakpoints_should_be_inserted_now(), btrace_free_objfile(), clean_up_just_stopped_threads_fsms(), clear_proceed_status(), fbsd_make_corefile_notes(), for_each_just_stopped_thread(), handle_no_resumed(), infrun_thread_stop_requested(), kill_new_fork_children(), kill_unfollowed_fork_children(), linux_make_corefile_notes(), live_threads_count(), mi_cmd_thread_list_ids(), number_of_live_inferiors(), proceed(), process_initial_stop_replies(), random_pending_event_thread(), record_btrace_close(), record_btrace_is_replaying(), record_btrace_open(), record_btrace_resume(), record_btrace_stop(), record_btrace_stop_recording(), record_btrace_stop_replaying_all(), record_btrace_wait(), record_full_wait_1(), remote_btrace_maybe_reopen(), remote_commit_resume(), remote_resume_with_hc(), remote_thread_handle_to_thread_info(), remove_new_fork_children(), restart_threads(), signal_command(), stop_all_threads(), switch_back_to_stepped_thread(), thread_apply_all_command(), thread_db_thread_handle_to_thread_info(), and update_threads_executing().

## ◆ ALL_THREADS

#define ALL_THREADS | ( |  | T | ) | for (T = thread_list; T; T = T->next) \

Definition at line 478 of file gdbthread.h.

Referenced by parse_thread_id(), and thread_info_from_private_thread_info().

## ◆ ALL_THREADS_BY_INFERIOR

#define ALL_THREADS_BY_INFERIOR | ( |  | inf,
|  |  | tp
| ) |  |

Value:
ALL_INFERIORS (inf) \
ALL_THREADS (tp) \
if (inf == tp->inf)
ALL_INFERIORS
#define ALL_INFERIORS(I)
Definition: inferior.h:548
inf
Definition: gnu-nat.c:174

Definition at line 482 of file gdbthread.h.

Referenced by print_thread_info_1().

## ◆ ALL_THREADS_SAFE

#define ALL_THREADS_SAFE | ( |  | T,
|  |  | TMP
| ) |  |

Value:
for ((T) = thread_list; \
(T) != NULL ? ((TMP) = (T)->next, 1): 0; \
(T) = (TMP))
thread_list
struct thread_info * thread_list
Definition: thread.c:53

Definition at line 496 of file gdbthread.h.

Referenced by delete_exited_threads(), follow_exec(), prune_threads(), and remote_update_thread_list().

## Typedef Documentation

## ◆ thread_callback_func

typedef int(* thread_callback_func) (struct thread_info *, void *)

Definition at line 474 of file gdbthread.h.

## ◆ value_ptr

typedef struct value* value_ptr

Definition at line 178 of file gdbthread.h.

## Enumeration Type Documentation

## ◆ thread_state

enum thread_state

Enumerator
THREAD_STOPPED |
THREAD_RUNNING |
THREAD_EXITED |

Definition at line 39 of file gdbthread.h.

## Function Documentation

## ◆ add_thread()

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().

## ◆ add_thread_silent()

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().

## ◆ add_thread_with_info()

struct thread_info* add_thread_with_info | ( | ptid_t | ptid,
|  | struct private_thread_info * |
| ) |  |

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().

## ◆ any_live_thread_of_process()

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().

## ◆ any_thread_of_process()

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().

## ◆ can_access_registers_ptid()

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().

## ◆ DEF_VEC_P()

DEF_VEC_P | ( | value_ptr |  | ) |

## ◆ delete_exception_resume_breakpoint()

void delete_exception_resume_breakpoint | ( | struct thread_info * |  | ) |

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().

## ◆ delete_exited_threads()

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().

## ◆ delete_single_step_breakpoints()

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().

## ◆ delete_step_resume_breakpoint()

void delete_step_resume_breakpoint | ( | struct thread_info * |  | ) |

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().

## ◆ delete_thread()

void delete_thread | ( | ptid_t |  | ) |

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().

## ◆ delete_thread_silent()

void delete_thread_silent | ( | ptid_t |  | ) |

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().

## ◆ enable_thread_stack_temporaries()

struct cleanup* enable_thread_stack_temporaries | ( | ptid_t | ptid | ) |

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().

## ◆ find_thread_by_handle()

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().

## ◆ find_thread_global_id()

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().

## ◆ find_thread_ptid()

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().

## ◆ finish_thread_state()

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().

## ◆ finish_thread_state_cleanup()

void finish_thread_state_cleanup | ( | void * | ptid_p | ) |

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().

## ◆ first_thread_of_process()

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().

## ◆ get_last_thread_stack_temporary()

struct value* get_last_thread_stack_temporary | ( | ptid_t |  | ) |

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().

## ◆ global_thread_id_to_ptid()

ptid_t global_thread_id_to_ptid | ( | int | num | ) |

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().

## ◆ in_thread_list()

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().

## ◆ inferior_thread()

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().

## ◆ init_thread_list()

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().

## ◆ is_executing()

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().

## ◆ is_exited()

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().

## ◆ is_running()

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().

## ◆ is_stopped()

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().

## ◆ iterate_over_threads()

struct thread_info* iterate_over_threads | ( | thread_callback_func | ,
|  | void * |
| ) |  |

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().

## ◆ pc_in_thread_step_range()

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().

## ◆ print_selected_thread_frame()

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().

## ◆ print_thread_id()

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().

## ◆ print_thread_info()

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().

## ◆ prune_threads()

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().

## ◆ ptid_to_global_thread_id()

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().

## ◆ push_thread_stack_temporary()

void push_thread_stack_temporary | ( | ptid_t | ptid,
|  | struct value * | v
| ) |  |

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().

## ◆ set_executing()

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().

## ◆ set_resumed()

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().

## ◆ set_running()

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().

## ◆ set_stop_requested()

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().

## ◆ show_inferior_qualified_tids()

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().

## ◆ show_thread_that_caused_stop()

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().

## ◆ switch_to_thread_no_regs()

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().

## ◆ thread_cancel_execution_command()

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().

## ◆ thread_change_ptid()

void thread_change_ptid | ( | ptid_t | old_ptid,
|  | ptid_t | new_ptid
| ) |  |

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().

## ◆ thread_command()

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().

## ◆ thread_count()

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().

## ◆ thread_has_single_step_breakpoint_here()

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().

## ◆ thread_has_single_step_breakpoints_set()

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().

## ◆ thread_is_in_step_over_chain()

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().

## ◆ thread_select()

void thread_select | ( | const char * | tidstr,
|  | class thread_info * | thr
| ) |  |

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().

## ◆ thread_stack_temporaries_enabled_p()

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().

## ◆ thread_step_over_chain_enqueue()

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().

## ◆ thread_step_over_chain_next()

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().

## ◆ thread_step_over_chain_remove()

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().

## ◆ threads_are_executing()

int threads_are_executing | ( | void |  | ) |

Definition at line 1021 of file thread.c.

References threads_executing.

Referenced by breakpoints_should_be_inserted_now().

## ◆ update_thread_list()

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().

## ◆ valid_global_thread_id()

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().

## ◆ validate_registers_access()

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().

## ◆ value_in_thread_stack_temporaries()

int value_in_thread_stack_temporaries | ( | struct value * | ,
|  | ptid_t |
| ) |  |

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().

## ◆ VEC()

typedef VEC | ( | value_ptr |  | ) |

## Variable Documentation

## ◆ print_thread_events

int print_thread_events

Definition at line 1912 of file thread.c.

Referenced by _initialize_thread(), add_thread_with_info(), exit_lwp(), procfs_wait(), and windows_delete_thread().

## ◆ thread_cmd_list

struct cmd_list_element* thread_cmd_list

Definition at line 2049 of file thread.c.

## ◆ thread_list

struct thread_info* thread_list

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().