GDB (xrefs)
|
#include "defs.h"
#include "symtab.h"
#include "frame.h"
#include "inferior.h"
#include "environ.h"
#include "value.h"
#include "target.h"
#include "gdbthread.h"
#include "exceptions.h"
#include "command.h"
#include "gdbcmd.h"
#include "regcache.h"
#include "gdb.h"
#include "gdb_string.h"
#include "btrace.h"
#include <ctype.h>
#include <sys/types.h>
#include <signal.h>
#include "ui-out.h"
#include "observer.h"
#include "annotate.h"
#include "cli/cli-decode.h"
#include "gdb_regex.h"
#include "cli/cli-utils.h"
#include "continuations.h"
Go to the source code of this file.
void _initialize_thread | ( | void | ) |
struct thread_info* add_thread | ( | ptid_t | ptid | ) | [read] |
Definition at line 261 of file thread.c.
References add_thread_with_info().
Referenced by add_to_thread_list(), bsd_uthread_find_new_threads(), bsd_uthread_wait(), dec_thread_find_new_threads(), do_attach(), handle_inferior_event(), inf_validate_procs(), linux_child_follow_fork(), linux_handle_extended_wait(), linux_nat_filter_event(), procfs_find_new_threads(), procfs_notice_thread(), procfs_wait(), ravenscar_add_thread(), ravenscar_update_inferior_ptid(), remote_add_thread(), remote_newthread_step(), sol_find_new_threads_callback(), sol_thread_wait(), sync_threadlists(), and windows_add_thread().
struct thread_info* add_thread_silent | ( | ptid_t | ptid | ) | [read] |
Definition at line 196 of file thread.c.
References delete_thread(), find_thread_ptid(), inferior_ptid, new_thread(), null_ptid, observer_notify_new_thread(), thread_info::ptid, ptid_equal(), thread_info::state, switch_to_thread(), THREAD_EXITED, and THREAD_STOPPED.
Referenced by add_current_inferior_and_thread(), add_thread_with_info(), bsd_kvm_open(), core_open(), darwin_attach(), extended_remote_attach_1(), fork_inferior(), gdbsim_create_inferior(), go32_create_inferior(), inf_ptrace_attach(), inf_validate_procs(), m32r_resume(), and monitor_open().
struct thread_info* add_thread_with_info | ( | ptid_t | ptid, |
struct private_thread_info * | private | ||
) | [read] |
Definition at line 247 of file thread.c.
References _, add_thread_silent(), annotate_new_thread(), print_thread_events, printf_unfiltered(), thread_info::private, and target_pid_to_str().
Referenced by add_thread(), attach_thread(), and darwin_check_new_threads().
struct thread_info* any_live_thread_of_process | ( | int | pid | ) | [read] |
Definition at line 478 of file thread.c.
References thread_info::executing, thread_info::next, thread_info::ptid, ptid_get_pid(), thread_info::state, and THREAD_EXITED.
Referenced by handle_vfork_child_exec_or_exit(), mi_cmd_execute(), reattach_breakpoints(), switch_to_program_space_and_thread(), and thread_db_find_new_threads().
int any_running | ( | void | ) |
Definition at line 651 of file thread.c.
References thread_info::next, thread_info::state, and THREAD_RUNNING.
struct thread_info* any_thread_of_process | ( | int | pid | ) | [read] |
Definition at line 466 of file thread.c.
References thread_info::next, thread_info::ptid, and ptid_get_pid().
Referenced by detach_inferior_command(), dispose_inferior(), have_live_inferiors(), inferior_command(), kill_inferior_command(), kill_or_detach(), mi_cmd_remove_inferior(), and run_one_inferior().
static void clear_thread_inferior_resources | ( | struct thread_info * | tp | ) | [static] |
Definition at line 110 of file thread.c.
References bpstat_clear(), btrace_teardown(), thread_info::control, delete_longjmp_breakpoint_at_next_stop(), disp_del_at_next_stop, breakpoint::disposition, do_all_continuations_thread(), do_all_intermediate_continuations_thread(), thread_control_state::exception_resume_breakpoint, thread_info::num, thread_control_state::step_resume_breakpoint, and thread_control_state::stop_bpstat.
Referenced by delete_thread_1().
void delete_exception_resume_breakpoint | ( | struct thread_info * | tp | ) |
Definition at line 100 of file thread.c.
References thread_info::control, delete_breakpoint(), and thread_control_state::exception_resume_breakpoint.
Referenced by delete_step_resume_breakpoint_callback(), delete_step_thread_step_resume_breakpoint(), follow_fork(), and handle_inferior_event().
void delete_step_resume_breakpoint | ( | struct thread_info * | tp | ) |
Definition at line 90 of file thread.c.
References thread_info::control, delete_breakpoint(), and thread_control_state::step_resume_breakpoint.
Referenced by delete_step_resume_breakpoint_callback(), delete_step_thread_step_resume_breakpoint(), follow_fork(), and handle_inferior_event().
void delete_thread | ( | ptid_t | ptid | ) |
Definition at line 324 of file thread.c.
References delete_thread_1().
Referenced by add_thread_silent(), attach_thread(), darwin_check_new_threads(), delete_thread_of_inferior(), exit_lwp(), handle_inferior_event(), procfs_wait(), prune_threads(), resync_thread_list(), sync_threadlists(), and windows_delete_thread().
static void delete_thread_1 | ( | ptid_t | ptid, |
int | silent | ||
) | [static] |
Definition at line 269 of file thread.c.
References clear_thread_inferior_resources(), free_thread(), inferior_ptid, thread_info::next, observer_notify_thread_exit(), ptid_equal(), and THREAD_EXITED.
Referenced by delete_thread(), and delete_thread_silent().
void delete_thread_silent | ( | ptid_t | ptid | ) |
Definition at line 330 of file thread.c.
References delete_thread_1().
Referenced by bsd_kvm_close(), delete_thread_of_inferior(), gdbsim_mourn_inferior(), go32_mourn_inferior(), m32r_close(), m32r_kill(), m32r_load(), monitor_close(), monitor_mourn_inferior(), and sdireset_command().
static int do_captured_list_thread_ids | ( | struct ui_out * | uiout, |
void * | arg | ||
) | [static] |
Definition at line 498 of file thread.c.
References cleanup_chain, current_thread, do_cleanups(), GDB_RC_OK, inferior_ptid, make_cleanup_ui_out_tuple_begin_end(), thread_info::next, thread_info::num, thread_info::ptid, ptid_equal(), thread_info::state, THREAD_EXITED, ui_out_field_int(), and update_thread_list().
Referenced by gdb_list_thread_ids().
static int do_captured_thread_select | ( | struct ui_out * | uiout, |
void * | tidstr | ||
) | [static] |
Definition at line 1438 of file thread.c.
References _, annotate_thread_changed(), error(), find_thread_id(), GDB_RC_OK, get_selected_frame(), inferior_ptid, thread_info::num, parse_and_eval(), pid_to_thread_id(), print_stack_frame(), prune_threads(), thread_info::ptid, SRC_AND_LOC, thread_info::state, switch_to_thread(), target_pid_to_str(), thread_alive(), THREAD_RUNNING, ui_out_field_int(), ui_out_text(), and value_as_long().
Referenced by gdb_thread_select().
static void do_restore_current_thread_cleanup | ( | void * | arg | ) | [static] |
Definition at line 1100 of file thread.c.
References find_inferior_id(), find_inferior_pid(), find_thread_ptid(), current_thread_cleanup::inf_id, inferior_ptid, current_thread_cleanup::inferior_ptid, is_stopped(), null_ptid, thread_info::ptid, ptid_equal(), ptid_get_pid(), restore_current_thread(), restore_selected_frame(), current_thread_cleanup::selected_frame_id, current_thread_cleanup::selected_frame_level, set_current_inferior(), target_has_memory, target_has_registers, target_has_stack, and current_thread_cleanup::was_stopped.
Referenced by make_cleanup_restore_current_thread().
struct thread_info* find_thread_id | ( | int | num | ) | [read] |
Definition at line 336 of file thread.c.
References thread_info::next, and thread_info::num.
Referenced by display_tib(), do_captured_thread_select(), longjmp_bkpt_dtor(), mi_cmd_execute(), mi_cmd_var_update_iter(), thread_apply_command(), and thread_id_to_pid().
struct thread_info* find_thread_ptid | ( | ptid_t | ptid | ) | [read] |
Definition at line 349 of file thread.c.
References thread_info::next, thread_info::ptid, and ptid_equal().
Referenced by add_thread_silent(), aix_thread_fetch_registers(), aix_thread_resume(), aix_thread_store_registers(), append_resumption(), attach_thread(), bpstat_clear_actions(), continue_command(), darwin_check_new_threads(), delete_checkpoint_command(), demand_private_info(), detach_thread(), displaced_step_prepare(), do_restore_current_thread_cleanup(), exit_lwp(), find_new_threads_callback(), finish_thread_state(), follow_fork(), get_pending_status(), handle_inferior_event(), inferior_thread(), infrun_thread_stop_requested_callback(), is_executing(), is_thread_state(), linux_handle_extended_wait(), linux_nat_resume_callback(), linux_nat_stop_lwp(), make_cleanup_restore_current_thread(), mi_on_resume(), proceed(), procfs_find_new_threads(), program_info(), python_on_normal_stop(), ravenscar_add_thread(), ravenscar_update_inferior_ptid(), record_btrace_info(), remote_core_of_thread(), remote_threads_extra_info(), require_btrace(), restore_current_thread_cleanup_dtor(), run_inferior_call(), set_executing(), set_running(), set_stop_requested(), task_command_1(), thread_change_ptid(), thread_db_get_thread_local_address(), thread_db_pid_to_str(), thread_get_info_callback(), and thread_id_make_value().
void finish_thread_state | ( | ptid_t | ptid | ) |
Definition at line 718 of file thread.c.
References all, thread_info::executing, find_thread_ptid(), gdb_assert, minus_one_ptid, thread_info::next, observer_notify_target_resumed(), thread_info::ptid, ptid_equal(), ptid_get_pid(), ptid_is_pid(), thread_info::state, THREAD_EXITED, THREAD_RUNNING, and THREAD_STOPPED.
Referenced by finish_thread_state_cleanup().
void finish_thread_state_cleanup | ( | void * | arg | ) |
Definition at line 757 of file thread.c.
References finish_thread_state(), and gdb_assert.
Referenced by fetch_inferior_event(), normal_stop(), prepare_for_detach(), run_command_1(), and wait_for_inferior().
struct thread_info* first_thread_of_process | ( | int | pid | ) | [read] |
Definition at line 453 of file thread.c.
References thread_info::next, thread_info::num, thread_info::ptid, and ptid_get_pid().
Referenced by core_open(), and extended_remote_attach_1().
static void free_thread | ( | struct thread_info * | tp | ) | [static] |
Definition at line 140 of file thread.c.
References thread_info::name, thread_info::private, thread_info::private_dtor, and xfree().
Referenced by delete_thread_1(), and init_thread_list().
enum gdb_rc gdb_list_thread_ids | ( | struct ui_out * | uiout, |
char ** | error_message | ||
) |
Definition at line 532 of file thread.c.
References catch_exceptions_with_msg(), do_captured_list_thread_ids(), GDB_RC_FAIL, GDB_RC_OK, and RETURN_MASK_ALL.
Referenced by mi_cmd_thread_list_ids().
enum gdb_rc gdb_thread_select | ( | struct ui_out * | uiout, |
char * | tidstr, | ||
char ** | error_message | ||
) |
Definition at line 1481 of file thread.c.
References catch_exceptions_with_msg(), do_captured_thread_select(), GDB_RC_FAIL, GDB_RC_OK, and RETURN_MASK_ALL.
Referenced by mi_cmd_thread_select(), and thread_command().
int in_thread_list | ( | ptid_t | ptid | ) |
Definition at line 438 of file thread.c.
References thread_info::next, thread_info::ptid, and ptid_equal().
Referenced by aix_thread_thread_alive(), breakpoint_re_set_thread(), bsd_uthread_find_new_threads(), bsd_uthread_wait(), check_event(), dec_thread_find_new_threads(), dec_thread_thread_alive(), handle_inferior_event(), procfs_notice_thread(), procfs_wait(), remote_newthread_step(), remote_notice_new_inferior(), set_momentary_breakpoint(), sol_find_new_threads_callback(), sol_thread_wait(), step_1(), and value_of_root_1().
struct thread_info* inferior_thread | ( | void | ) | [read] |
Definition at line 82 of file thread.c.
References find_thread_ptid(), gdb_assert, and inferior_ptid.
Referenced by arm_linux_copy_svc(), attach_command_post_wait(), bpstat_do_actions(), breakpoint_about_to_proceed(), call_function_by_hand(), clear_proceed_status(), delete_step_thread_step_resume_breakpoint(), displaced_step_fixup(), do_initial_windows_stuff(), finish_backward(), finish_command(), finish_command_continuation(), finish_forward(), follow_exec(), follow_fork(), follow_inferior_reset_breakpoints(), gdbtk_annotate_signal(), handle_inferior_event(), inferior_event_handler(), infrun_thread_stop_requested_callback(), insert_exception_resume_breakpoint(), insert_exception_resume_from_probe(), insert_longjmp_resume_breakpoint(), insert_step_resume_breakpoint_at_sal_1(), irix_solib_create_inferior_hook(), linux_child_follow_fork(), mi_about_to_proceed(), mi_execute_command(), mi_on_resume(), normal_stop(), osf_solib_create_inferior_hook(), print_end_stepping_range_reason(), print_signal_received_reason(), proceed(), python_on_normal_stop(), restore_infcall_control_state(), restore_infcall_suspend_state(), resume(), save_infcall_control_state(), save_infcall_suspend_state(), set_step_info(), spu_skip_standalone_loader(), step_1(), step_1_continuation(), step_once(), thread_name_command(), until_break_command(), and until_next_command().
static void info_threads_command | ( | char * | arg, |
int | from_tty | ||
) | [static] |
Definition at line 984 of file thread.c.
References current_uiout, and print_thread_info().
void init_thread_list | ( | void | ) |
Definition at line 155 of file thread.c.
References free_thread(), highest_thread_num, and thread_info::next.
Referenced by core_open(), detach_command(), disconnect_command(), extended_remote_create_inferior_1(), fork_inferior(), gdbsim_create_inferior(), kill_command(), monitor_open(), procfs_detach(), procfs_mourn_inferior(), procfs_open(), remote_open_1(), and windows_init_thread_list().
int is_executing | ( | ptid_t | ptid | ) |
Definition at line 663 of file thread.c.
References thread_info::executing, find_thread_ptid(), and gdb_assert.
Referenced by bpstat_do_actions(), get_current_frame(), get_pending_status(), has_stack_frames(), infrun_thread_stop_requested_callback(), notice_new_inferior(), proceed_after_attach_callback(), proceed_after_vfork_done(), resume_stopped_resumed_lwps(), switch_to_thread(), and watchpoint_in_thread_scope().
Definition at line 639 of file thread.c.
References is_thread_state(), and THREAD_EXITED.
Referenced by bpstat_do_actions(), bsd_uthread_find_new_threads(), bsd_uthread_wait(), clear_proceed_status_callback(), delete_step_resume_breakpoint_callback(), ensure_valid_thread(), find_thread_of_process(), get_current_frame(), handle_inferior_event(), has_stack_frames(), mi_cmd_execute(), print_thread_info(), proceed_after_attach_callback(), procfs_notice_thread(), program_info(), remote_notice_new_inferior(), sol_find_new_threads_callback(), sol_thread_wait(), switch_to_thread(), thpy_is_exited(), thread_command(), and validate_siginfo_access().
int is_running | ( | ptid_t | ptid | ) |
Definition at line 645 of file thread.c.
References is_thread_state(), and THREAD_RUNNING.
Referenced by ensure_not_running(), fetch_inferior_event(), inferior_command(), infrun_thread_stop_requested_callback(), interrupt_thread_callback(), proceed_after_vfork_done(), program_info(), run_inferior_call(), thpy_is_running(), until_break_command(), until_next_command(), and validate_siginfo_access().
int is_stopped | ( | ptid_t | ptid | ) |
Definition at line 633 of file thread.c.
References is_thread_state(), and THREAD_STOPPED.
Referenced by delete_checkpoint_command(), do_restore_current_thread_cleanup(), finish_command_continuation(), make_cleanup_restore_current_thread(), mi_cmd_var_update_iter(), proceed_thread(), proceed_thread_callback(), and thpy_is_stopped().
static int is_thread_state | ( | ptid_t | ptid, |
enum thread_state | state | ||
) | [static] |
Definition at line 623 of file thread.c.
References find_thread_ptid(), gdb_assert, and thread_info::state.
Referenced by is_exited(), is_running(), and is_stopped().
struct thread_info* iterate_over_threads | ( | int(*)(struct thread_info *, void *) | callback, |
void * | data | ||
) | [read] |
Definition at line 375 of file thread.c.
References thread_info::next.
Referenced by clear_proceed_status(), continue_1(), delete_breakpoint(), delete_inferior_1(), delete_step_thread_step_resume_breakpoint(), discard_all_continuations(), discard_all_intermediate_continuations(), do_all_continuations(), do_all_intermediate_continuations(), exec_continue(), exit_inferior_1(), find_stop_signal(), handle_inferior_event(), handle_vfork_child_exec_or_exit(), have_threads(), inf_has_multiple_threads(), infrun_thread_stop_requested(), linux_make_corefile_notes(), mi_cmd_exec_interrupt(), mi_cmd_target_detach(), mi_on_resume(), pd_update(), print_one_inferior(), proceed_after_attach(), remote_start_remote(), resync_thread_list(), sol_get_ada_task_ptid(), sync_threadlists(), and thread_db_get_ada_task_ptid().
struct cleanup* make_cleanup_restore_current_thread | ( | void | ) | [read] |
Definition at line 1161 of file thread.c.
References current_inferior(), do_restore_current_thread_cleanup(), find_thread_ptid(), frame_relative_level(), get_frame_id(), get_selected_frame_if_set(), current_thread_cleanup::inf_id, inferior_ptid, current_thread_cleanup::inferior_ptid, is_stopped(), make_cleanup_dtor(), null_ptid, inferior::num, ptid_equal(), thread_info::refcount, inferior::removable, restore_current_thread_cleanup_dtor(), current_thread_cleanup::selected_frame_id, current_thread_cleanup::selected_frame_level, target_has_memory, target_has_registers, target_has_stack, current_thread_cleanup::was_removable, current_thread_cleanup::was_stopped, and xmalloc().
Referenced by continue_1(), exec_continue(), fetch_inferior_event(), handle_vfork_child_exec_or_exit(), infrun_thread_stop_requested_callback(), mi_cmd_trace_frame_collected(), notice_new_inferior(), print_thread_info(), proceed_after_attach(), save_current_space_and_thread(), thread_apply_all_command(), thread_apply_command(), trace_dump_command(), and value_of_root_1().
static struct thread_info* new_thread | ( | ptid_t | ptid | ) | [static, read] |
Definition at line 177 of file thread.c.
References highest_thread_num, target_waitstatus::kind, thread_info::next, thread_info::num, thread_info::pending_follow, thread_info::ptid, thread_info::state, TARGET_WAITKIND_SPURIOUS, thread_list, THREAD_STOPPED, and xcalloc().
Referenced by add_thread_silent(), linux_nat_set_new_thread(), procfs_find_new_threads(), and remote_threads_info().
int pc_in_thread_step_range | ( | CORE_ADDR | pc, |
struct thread_info * | thread | ||
) |
Definition at line 767 of file thread.c.
References thread_info::control, thread_control_state::step_range_end, and thread_control_state::step_range_start.
Referenced by handle_inferior_event(), and resume().
int pid_to_thread_id | ( | ptid_t | ptid | ) |
Definition at line 415 of file thread.c.
References thread_info::next, thread_info::num, thread_info::ptid, and ptid_equal().
Referenced by bpfinishpy_init(), bpstat_check_breakpoint_conditions(), breakpoint_re_set_thread(), breakpoint_thread_match(), do_captured_thread_select(), elf_gnu_ifunc_resolver_stop(), handle_inferior_event(), inferior_command(), mi_on_normal_stop(), pop_dummy_frame_bpt(), print_ada_task_info(), set_longjmp_breakpoint_for_call_dummy(), set_momentary_breakpoint(), step_1(), thread_command(), and varobj_create().
void print_thread_info | ( | struct ui_out * | uiout, |
char * | requested_threads, | ||
int | pid | ||
) |
Definition at line 785 of file thread.c.
References _, current_thread, do_cleanups(), error(), gdb_assert, get_selected_frame(), inferior_ptid, is_exited(), LOCATION, make_cleanup(), make_cleanup_restore_current_thread(), make_cleanup_ui_out_list_begin_end(), make_cleanup_ui_out_table_begin_end(), make_cleanup_ui_out_tuple_begin_end(), name, thread_info::name, thread_info::next, null_ptid, thread_info::num, number_is_in_list(), print_stack_frame(), thread_info::ptid, ptid_equal(), ptid_get_pid(), thread_info::state, switch_to_thread(), target_core_of_thread(), target_extra_thread_info, target_pid_to_str(), target_thread_name(), THREAD_EXITED, THREAD_RUNNING, ui_left, ui_out_field_int(), ui_out_field_skip(), ui_out_field_string(), ui_out_is_mi_like_p(), ui_out_message(), ui_out_table_body(), ui_out_table_header(), ui_out_text(), update_thread_list(), xfree(), and xstrprintf().
Referenced by info_threads_command(), mi_cmd_list_thread_groups(), mi_cmd_thread_info(), and print_one_inferior().
static void prune_threads | ( | void | ) | [static] |
Definition at line 552 of file thread.c.
References delete_thread(), thread_info::next, thread_info::ptid, and thread_alive().
Referenced by do_captured_thread_select(), gnu_wait(), and update_thread_list().
static void restore_current_thread | ( | ptid_t | ptid | ) | [static] |
Definition at line 1025 of file thread.c.
References switch_to_thread().
Referenced by do_restore_current_thread_cleanup().
static void restore_current_thread_cleanup_dtor | ( | void * | arg | ) | [static] |
Definition at line 1133 of file thread.c.
References find_inferior_id(), find_thread_ptid(), arm-linux::inf, current_thread_cleanup::inf_id, current_thread_cleanup::inferior_ptid, thread_info::refcount, inferior::removable, current_thread_cleanup::was_removable, and xfree().
Referenced by make_cleanup_restore_current_thread().
static void restore_selected_frame | ( | struct frame_id | a_frame_id, |
int | frame_level | ||
) | [static] |
Definition at line 1031 of file thread.c.
References _, current_uiout, find_relative_frame(), frame_find_by_id(), frame_id_eq(), gdb_assert, get_current_frame(), get_frame_id(), get_selected_frame(), print_stack_frame(), select_frame(), SRC_AND_LOC, ui_out_is_mi_like_p(), and warning().
Referenced by do_restore_current_thread_cleanup().
void set_executing | ( | ptid_t | ptid, |
int | executing | ||
) |
Definition at line 673 of file thread.c.
References all, thread_info::executing, find_thread_ptid(), gdb_assert, minus_one_ptid, thread_info::next, thread_info::ptid, ptid_equal(), ptid_get_pid(), and ptid_is_pid().
Referenced by handle_inferior_event(), linux_handle_extended_wait(), record_full_wait_1(), remote_add_thread(), spu_skip_standalone_loader(), startup_inferior(), and target_resume().
void set_running | ( | ptid_t | ptid, |
int | running | ||
) |
Definition at line 583 of file thread.c.
References all, find_thread_ptid(), gdb_assert, minus_one_ptid, thread_info::next, observer_notify_target_resumed(), thread_info::ptid, ptid_equal(), ptid_get_pid(), ptid_is_pid(), thread_info::state, THREAD_EXITED, THREAD_RUNNING, and THREAD_STOPPED.
Referenced by linux_handle_extended_wait(), remote_add_thread(), resume(), step_once(), and target_resume().
void set_stop_requested | ( | ptid_t | ptid, |
int | stop | ||
) |
Definition at line 693 of file thread.c.
References all, find_thread_ptid(), gdb_assert, minus_one_ptid, thread_info::next, observer_notify_thread_stop_requested(), thread_info::ptid, ptid_equal(), ptid_get_pid(), ptid_is_pid(), and thread_info::stop_requested.
Referenced by interrupt_target_1(), and set_stop_requested_callback().
static void set_thread_refcount | ( | void * | data | ) | [static] |
Definition at line 1151 of file thread.c.
References thread_array_cleanup::count, thread_info::refcount, and thread_array_cleanup::tp_array.
Referenced by thread_apply_all_command().
static void show_print_thread_events | ( | struct ui_file * | file, |
int | from_tty, | ||
struct cmd_list_element * | c, | ||
const char * | value | ||
) | [static] |
Definition at line 1429 of file thread.c.
References _, and fprintf_filtered().
void switch_to_thread | ( | ptid_t | ptid | ) |
Definition at line 992 of file thread.c.
References find_inferior_pid(), gdb_assert, get_thread_regcache(), arm-linux::inf, inferior_ptid, is_executing(), is_exited(), null_ptid, inferior::pspace, ptid_equal(), ptid_get_pid(), regcache_read_pc(), reinit_frame_cache(), set_current_inferior(), set_current_program_space(), and stop_pc.
Referenced by add_inferior_command(), add_thread_silent(), clone_inferior_command(), context_switch(), core_open(), detach_inferior_command(), dispose_inferior(), do_all_continuations_ptid(), do_captured_thread_select(), follow_fork(), gdbsim_close_inferior(), handle_inferior_event(), handle_vfork_child_exec_or_exit(), inferior_command(), kill_inferior_command(), kill_or_detach(), mi_cmd_execute(), mi_cmd_remove_inferior(), mi_cmd_target_detach(), notice_new_inferior(), prepare_to_proceed(), print_thread_info(), proceed_after_attach_callback(), proceed_after_vfork_done(), proceed_thread(), proceed_thread_callback(), restore_current_thread(), restore_thread_cleanup(), run_one_inferior(), startup_inferior(), switch_to_program_space_and_thread(), task_command_1(), thpy_switch(), thread_apply_all_command(), thread_apply_command(), and value_of_root_1().
static int thread_alive | ( | struct thread_info * | tp | ) | [static] |
Definition at line 542 of file thread.c.
References thread_info::ptid, thread_info::state, target_thread_alive(), and THREAD_EXITED.
Referenced by do_captured_thread_select(), prune_threads(), thread_apply_all_command(), and thread_apply_command().
static void thread_apply_all_command | ( | char * | cmd, |
int | from_tty | ||
) | [static] |
Definition at line 1213 of file thread.c.
References _, ALL_THREADS, thread_array_cleanup::count, do_cleanups(), error(), execute_command(), inferior_ptid, make_cleanup(), make_cleanup_restore_current_thread(), thread_info::num, printf_filtered(), thread_info::refcount, set_thread_refcount(), switch_to_thread(), target_pid_to_str(), thread_alive(), thread_count(), thread_array_cleanup::tp_array, tp_array, update_thread_list(), xfree(), and xmalloc().
static void thread_apply_command | ( | char * | tidlist, |
int | from_tty | ||
) | [static] |
Definition at line 1273 of file thread.c.
References _, do_cleanups(), error(), execute_command(), find_thread_id(), get_number_or_range_state::finished, get_number_or_range(), inferior_ptid, init_number_or_range(), make_cleanup(), make_cleanup_restore_current_thread(), thread_info::num, printf_filtered(), thread_info::ptid, get_number_or_range_state::string, switch_to_thread(), target_pid_to_str(), thread_alive(), warning(), and xfree().
void thread_change_ptid | ( | ptid_t | old_ptid, |
ptid_t | new_ptid | ||
) |
Definition at line 565 of file thread.c.
References find_inferior_pid(), find_thread_ptid(), arm-linux::inf, observer_notify_thread_ptid_changed(), inferior::pid, thread_info::ptid, and ptid_get_pid().
Referenced by bsd_uthread_find_new_threads(), bsd_uthread_wait(), darwin_init_thread_list(), gnu_create_inferior(), inf_validate_procs(), linux_nat_attach(), linux_nat_switch_fork(), linux_nat_wait_1(), procfs_init_inferior(), and remote_notice_new_inferior().
static void thread_command | ( | char * | tidstr, |
int | from_tty | ||
) | [static] |
Definition at line 1329 of file thread.c.
References _, current_uiout, error(), gdb_thread_select(), inferior_ptid, is_exited(), null_ptid, pid_to_thread_id(), printf_filtered(), ptid_equal(), target_has_stack, and target_pid_to_str().
int thread_count | ( | void | ) |
Definition at line 391 of file thread.c.
References thread_info::next.
Referenced by info_mach_threads_command(), mi_execute_command(), remote_start_remote(), thread_apply_all_command(), and update_global_location_list().
static void thread_find_command | ( | char * | arg, |
int | from_tty | ||
) | [static] |
Definition at line 1375 of file thread.c.
References _, error(), thread_info::name, thread_info::next, thread_info::num, printf_filtered(), thread_info::ptid, re_comp(), target_extra_thread_info, target_pid_to_str(), target_thread_name(), and update_thread_list().
static struct value* thread_id_make_value | ( | struct gdbarch * | gdbarch, |
struct internalvar * | var, | ||
void * | ignore | ||
) | [static, read] |
Definition at line 1500 of file thread.c.
References find_thread_ptid(), inferior_ptid, thread_info::num, and value_from_longest().
ptid_t thread_id_to_pid | ( | int | num | ) |
Definition at line 427 of file thread.c.
References find_thread_id(), pid_to_ptid(), and thread_info::ptid.
Referenced by set_sig_thread_cmd(), and value_of_root_1().
static void thread_name_command | ( | char * | arg, |
int | from_tty | ||
) | [static] |
Definition at line 1358 of file thread.c.
References _, error(), inferior_ptid, inferior_thread(), thread_info::name, null_ptid, ptid_equal(), skip_spaces(), and xfree().
void update_thread_list | ( | void | ) |
Definition at line 1490 of file thread.c.
References prune_threads(), and target_find_new_threads().
Referenced by checkpoint_command(), do_captured_list_thread_ids(), infpy_threads(), mi_cmd_list_thread_groups(), print_thread_info(), thread_apply_all_command(), and thread_find_command().
int valid_thread_id | ( | int | num | ) |
Definition at line 403 of file thread.c.
References thread_info::next, and thread_info::num.
Referenced by bppy_set_thread(), find_condition_and_thread(), insert_breakpoint_locations(), and watch_command_1().
int highest_thread_num [static] |
Definition at line 58 of file thread.c.
Referenced by init_thread_list(), and new_thread().
Definition at line 1427 of file thread.c.
Referenced by add_thread_with_info(), exit_lwp(), procfs_wait(), and windows_delete_thread().
struct cmd_list_element* thread_cmd_list = NULL |
struct internalvar_funcs thread_funcs [static] |
{ thread_id_make_value, NULL, NULL }
struct thread_info* thread_list = NULL |
Definition at line 57 of file thread.c.
Referenced by darwin_check_new_threads(), and new_thread().