26#include "gdbsupport/environ.h"
43#include "gdbsupport/gdb_regex.h"
48#include "gdbsupport/gdb_optional.h"
154 return (ss_bps != NULL
211 if (proc_target !=
nullptr)
228 gdb_assert (nr_deleted == 1);
238 inf->clear_thread_list (
true);
250 inf->num, ptid.to_string ().c_str ());
252 inf->thread_list.push_back (*tp);
255 gdb_assert (
inf->ptid_thread_map.find (ptid) ==
inf->ptid_thread_map.end ());
257 inf->ptid_thread_map[ptid] = tp;
265 gdb_assert (targ !=
nullptr);
270 inf->num, ptid.to_string ().c_str (),
293 result->
priv.reset (priv);
311 : ptid (ptid_),
inf (inf_)
313 gdb_assert (inf_ != NULL);
414 for (
const thread_info &thread ATTRIBUTE_UNUSED : l)
426 tp->
ptid.to_string ().c_str ());
446 tp->
ptid.to_string ().c_str ());
461 gdb_assert (thr !=
nullptr);
464 thr->
ptid.to_string ().c_str (), silent);
498 if (tp->global_num == global_id)
508 if (tp->per_inf_num == thr_num)
530 gdb_assert (
inf !=
nullptr);
532 auto it =
inf->ptid_thread_map.find (ptid);
533 if (it !=
inf->ptid_thread_map.end ())
569 if ((*callback) (tp, data))
589 return std::distance (rng.begin (), rng.end ());
598 return std::distance (rng.begin (), rng.end ());
605 if (tp->global_num == global_id)
622 if (
inf->thread_list.empty ())
625 return &
inf->thread_list.front ();
631 gdb_assert (
inf->
pid != 0);
649 gdb_assert (
inf != NULL &&
inf->
pid != 0);
666 if (!tp->executing ())
782 struct value *lastval = NULL;
784 gdb_assert (tp != NULL);
793 ptid_t old_ptid, ptid_t new_ptid)
802 inf->
pid = new_ptid.pid ();
805 gdb_assert (tp !=
nullptr);
807 int num_erased =
inf->ptid_thread_map.erase (old_ptid);
808 gdb_assert (num_erased == 1);
811 inf->ptid_thread_map[new_ptid] = tp;
822 tp->set_resumed (resumed);
831 bool started =
false;
838 tp->
ptid.to_string ().c_str (), running,
839 (started ?
" (started)" :
""));
869 bool any_started =
false;
883 tp->set_executing (executing);
890 else if (minus_one_ptid == ptid)
906 tp->stop_requested = stop;
917 bool any_started =
false;
934 error (_(
"No thread selected."));
940 error (_(
"The current thread has terminated"));
948 error (_(
"Selected thread is running."));
975 && pc < thread->control.step_range_end);
992 if (requested_threads != NULL && *requested_threads !=
'\0')
1007 if (requested_threads != NULL && *requested_threads !=
'\0')
1008 error (_(
"Requested thread not found in requested process"));
1028 if (extra_info !=
nullptr &&
name !=
nullptr)
1029 return string_printf (
"%s \"%s\" (%s)", target_id.c_str (),
name,
1031 else if (extra_info !=
nullptr)
1032 return string_printf (
"%s (%s)", target_id.c_str (), extra_info);
1033 else if (
name !=
nullptr)
1034 return string_printf (
"%s \"%s\"", target_id.c_str (),
name);
1045 int global_ids,
int pid,
1046 int show_global_ids)
1053 bool any_thread =
false;
1055 bool current_exited =
false;
1064 gdb::optional<ui_out_emit_list> list_emitter;
1065 gdb::optional<ui_out_emit_table> table_emitter;
1071 list_emitter.emplace (uiout,
"threads");
1077 size_t target_id_col_width = 17;
1082 global_ids,
pid, tp))
1092 = std::max (target_id_col_width,
1101 if (requested_threads == NULL || *requested_threads ==
'\0')
1102 uiout->
message (_(
"No threads.\n"));
1104 uiout->
message (_(
"No threads match '%s'.\n"),
1109 table_emitter.emplace (uiout, show_global_ids ? 5 : 4,
1110 n_threads,
"threads");
1114 if (show_global_ids)
1117 "target-id",
"Target Id");
1129 current_exited =
true;
1132 global_ids,
pid, tp))
1139 if (tp == current_thread)
1165 if (extra_info !=
nullptr)
1178 uiout->
text (
"(running)\n");
1191 const char *state =
"stopped";
1208 if (
pid == -1 && requested_threads == NULL)
1215The current thread <Thread ID %s> has terminated. See `help thread'.\n",
1219No selected thread. See `help thread'.\n");
1245 N_(
"Show global thread IDs."),
1282 const char *text,
const char *word_ignored)
1305 gdb_assert (thread !=
nullptr);
1337 gdb_assert (thr != NULL);
1433 char *s = get_print_cell ();
1438 xsnprintf (s, PRINT_CELL_SIZE,
"%d", thr->
per_inf_num);
1449 if (a->inf->num != b->inf->num)
1450 return a->inf->num < b->inf->num;
1452 return (a->per_inf_num < b->per_inf_num);
1462 if (a->inf->num != b->inf->num)
1463 return a->inf->num > b->inf->num;
1465 return (a->per_inf_num > b->per_inf_num);
1472 const char *cmd,
int from_tty,
1480 std::string thr_header;
1481 if (ada_task.has_value ())
1482 thr_header = string_printf (_(
"\nTask ID %d:\n"), *ada_task);
1484 thr_header = string_printf (_(
"\nThread %s (%s):\n"),
1490 std::string cmd_result;
1492 (cmd_result, cmd, from_tty,
gdb_stdout->term_out ());
1493 if (!
flags.silent || cmd_result.length () > 0)
1500 catch (
const gdb_exception_error &ex)
1519Call COMMAND for all threads in ascending order.\n\
1520The default is descending order."),
1531 "q", [] (
qcs_flags *opt) {
return &opt->quiet; },
1532 N_(
"Disables printing the thread information."),
1536 "c", [] (
qcs_flags *opt) {
return &opt->cont; },
1537 N_(
"Print any error raised by COMMAND and continue."),
1541 "s", [] (
qcs_flags *opt) {
return &opt->silent; },
1542 N_(
"Silently ignore any errors or empty output produced by COMMAND."),
1549static inline std::array<gdb::option::option_def_group, 2>
1579 bool ascending =
false;
1589 if (cmd == NULL || *cmd ==
'\000')
1590 error (_(
"Please specify a command at the end of 'thread apply all'"));
1602 std::vector<thread_info_ref> thr_list_cpy;
1603 thr_list_cpy.reserve (tc);
1606 thr_list_cpy.push_back (thread_info_ref::new_reference (tp));
1607 gdb_assert (thr_list_cpy.size () == tc);
1609 auto *sorter = (ascending
1612 std::sort (thr_list_cpy.begin (), thr_list_cpy.end (), sorter);
1627 const char *text,
const char * )
1640 int inf_num, thr_start, thr_end;
1649 catch (
const gdb_exception_error &ex)
1656 const char *cmd = parser.
cur_tok ();
1666 && cmd > text && !isspace (cmd[-1]))
1686 const char *text,
const char *word)
1703 const char *cmd = NULL;
1706 if (tidlist == NULL || *tidlist ==
'\000')
1707 error (_(
"Please specify a thread ID list"));
1712 int inf_num, thr_start, thr_end;
1727 error (_(
"Please specify a command following the thread ID list"));
1729 if (tidlist == cmd || isdigit (cmd[0]))
1739 int inf_num, thr_num;
1741 parser.
get_tid (&inf_num, &thr_num);
1750 warning (_(
"Unknown inferior %d"), inf_num);
1757 if (thr_num >=
inf->highest_thread_num)
1768 warning (_(
"Unknown thread %d.%d"), inf_num, thr_num);
1770 warning (_(
"Unknown thread %d"), thr_num);
1790 if (cmd == NULL || *cmd ==
'\0')
1791 error (_(
"Please specify a command to apply on all threads"));
1792 std::string expanded = std::string (
"thread apply all -s ") + cmd;
1801 if (cmd == NULL || *cmd ==
'\0')
1802 error (_(
"Please specify a command to apply on all frames of all threads"));
1803 std::string expanded
1804 = std::string (
"thread apply all -s -- frame apply all -s ") + cmd;
1816 error (_(
"No thread selected"));
1823 gdb_printf (_(
"[Current thread is %s (%s) (exited)]\n"),
1827 gdb_printf (_(
"[Current thread is %s (%s)]\n"),
1832 error (_(
"No stack."));
1864 error (_(
"No thread selected"));
1866 arg = skip_spaces (arg);
1869 info->set_name (arg !=
nullptr ? make_unique_xstrdup (arg) :
nullptr);
1878 unsigned long match = 0;
1880 if (arg == NULL || *arg ==
'\0')
1881 error (_(
"Command requires an argument."));
1885 error (_(
"Invalid regexp (%s): %s"), tmp, arg);
1896 if (tp->name () !=
nullptr && re_exec (tp->name ()))
1904 if (tmp != NULL && re_exec (tmp))
1906 gdb_printf (_(
"Thread %s has target name '%s'\n"),
1912 if (!
name.empty () && re_exec (
name.c_str ()))
1914 gdb_printf (_(
"Thread %s has target id '%s'\n"),
1920 if (tmp != NULL && re_exec (tmp))
1922 gdb_printf (_(
"Thread %s has extra info '%s'\n"),
1928 gdb_printf (_(
"No threads match '%s'\n"), arg);
1938 _(
"Printing of thread events is %s.\n"),
1948 error (_(
"Thread ID %s has terminated."), tidstr);
1961 user_selected_what selection)
1974 uiout->
text (
"[Switching to thread ");
1985 uiout->
text (
"(running)\n");
2014 if (!
inf->has_execution ())
2019 if (
inf->thread_list.empty ())
2027 if (tp->executing ())
2049 const char *
name = thread->
name ();
2050 if (
name !=
nullptr)
2078 gdb_assert_not_reached (
"unknown thread state");
2085static struct value *
2108static struct value *
2119static struct value *
2130static struct value *
2180 static std::string info_threads_help
2182Display currently known threads.\n\
2183Usage: info threads [OPTION]... [ID]...\n\
2184If ID is given, it is a space-separated list of IDs of threads to display.\n\
2185Otherwise, all threads are displayed.\n\
2196Use this command to switch between threads.\n\
2197The new thread ID must be currently known."),
2202#define THREAD_APPLY_OPTION_HELP "\
2203Prints per-inferior thread number and target system's thread id\n\
2204followed by COMMAND output.\n\
2206By default, an error raised during the execution of COMMAND\n\
2207aborts \"thread apply\".\n\
2215Apply a command to a list of threads.\n\
2216Usage: thread apply ID... [OPTION]... COMMAND\n\
2217ID is a space-separated list of IDs of threads to apply COMMAND on.\n"
2222 thread_apply_help.c_str (),
2223 &thread_apply_list, 1,
2227 const auto thread_apply_all_opts
2231Apply a command to all threads.\n\
2233Usage: thread apply all [OPTION]... COMMAND\n"
2235 thread_apply_all_opts);
2238 thread_apply_all_help.c_str (),
2239 &thread_apply_list);
2243Apply a command to all threads (ignoring errors and empty output).\n\
2244Usage: taas [OPTION]... COMMAND\n\
2245shortcut for 'thread apply all -s [OPTION]... COMMAND'\n\
2246See \"help thread apply all\" for available options."));
2250Apply a command to all frames of all threads (ignoring errors and empty output).\n\
2251Usage: tfaas [OPTION]... COMMAND\n\
2252shortcut for 'thread apply all -s -- frame apply all -s [OPTION]... COMMAND'\n\
2253See \"help frame apply all\" for available options."));
2257 _(
"Set the current thread's name.\n\
2258Usage: thread name [NAME]\n\
2259If NAME is not given, then any existing name is removed."), &
thread_cmd_list);
2262Find threads that match a regular expression.\n\
2263Usage: thread find REGEXP\n\
2264Will display thread ids whose name, target ID, or extra info matches REGEXP."),
2269Set printing of thread events (such as thread start and exit)."), _(
"\
2270Show printing of thread events (such as thread start and exit)."), NULL,
2276Set thread debugging."), _(
"\
2277Show thread debugging."), _(
"\
2278When on messages about thread creation and deletion are printed."),
void annotate_new_thread(void)
void annotate_thread_changed(void)
void delete_breakpoint(struct breakpoint *bpt)
void bpstat_clear(bpstat **bsp)
int breakpoint_has_location_inserted_here(struct breakpoint *bp, const address_space *aspace, CORE_ADDR pc)
void delete_longjmp_breakpoint_at_next_stop(int thread)
void btrace_teardown(struct thread_info *tp)
void add_completion(gdb::unique_xmalloc_ptr< char > name, completion_match_for_lcd *match_for_lcd=NULL, const char *text=NULL, const char *word=NULL)
void advance_custom_word_point_by(int len)
void set_use_custom_word_point(bool enable)
struct process_stratum_target * process_target()
std::unordered_map< ptid_t, thread_info *, hash_ptid > ptid_thread_map
inf_non_exited_threads_range non_exited_threads()
intrusive_list< thread_info > thread_list
void maybe_remove_resumed_with_pending_wait_status(thread_info *thread)
void maybe_add_resumed_with_pending_wait_status(thread_info *thread)
int m_selected_frame_level
~scoped_restore_current_thread()
scoped_restore_current_thread()
frame_id m_selected_frame_id
thread_info(inferior *inf, ptid_t ptid)
void set_pending_waitstatus(const target_waitstatus &ws)
thread_suspend_state m_suspend
std::vector< struct value * > stack_temporaries
void set_resumed(bool resumed)
std::unique_ptr< struct thread_fsm > release_thread_fsm()
intrusive_list_node< thread_info > step_over_list_node
void set_running(bool running)
std::unique_ptr< private_thread_info > priv
void set_executing(bool executing)
bool has_pending_waitstatus() const
void clear_pending_waitstatus()
struct target_waitstatus pending_follow
struct thread_fsm * thread_fsm() const
bool stack_temporaries_enabled
const char * name() const
thread_control_state control
const char * cur_tok() const
bool in_thread_range() const
bool tid_is_qualified() const
bool get_tid_range(int *inf_num, int *thr_start, int *thr_end)
void init(const char *tidlist, int default_inferior)
bool get_tid(int *inf_num, int *thr_num)
bool in_star_range() const
void field_string(const char *fldname, const char *string, const ui_file_style &style=ui_file_style())
void field_signed(const char *fldname, LONGEST value)
void field_skip(const char *fldname)
void text(const char *string)
void table_header(int width, ui_align align, const std::string &col_name, const std::string &col_hdr)
bool is_mi_like_p() const
void message(const char *format,...) ATTRIBUTE_PRINTF(2
struct cmd_list_element * showprintlist
struct cmd_list_element * cmdlist
struct cmd_list_element * setprintlist
struct cmd_list_element * showdebuglist
struct cmd_list_element * setdebuglist
struct cmd_list_element * add_cmd(const char *name, enum command_class theclass, const char *doc, struct cmd_list_element **list)
void set_cmd_completer_handle_brkchars(struct cmd_list_element *cmd, completer_handle_brkchars_ftype *func)
cmd_list_element * add_com_alias(const char *name, cmd_list_element *target, command_class theclass, int abbrev_flag)
struct cmd_list_element * add_com(const char *name, enum command_class theclass, cmd_simple_func_ftype *fun, const char *doc)
struct cmd_list_element * add_prefix_cmd(const char *name, enum command_class theclass, cmd_simple_func_ftype *fun, const char *doc, struct cmd_list_element **subcommands, int allow_unknown, struct cmd_list_element **list)
set_show_commands add_setshow_boolean_cmd(const char *name, enum command_class theclass, bool *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_func_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
struct cmd_list_element * add_info(const char *name, cmd_simple_func_ftype *fun, const char *doc)
int number_is_in_list(const char *list, int number)
void validate_flags_qcs(const char *which_command, qcs_flags *flags)
void complete_nested_command_line(completion_tracker &tracker, const char *text)
EXTERN_C char * re_comp(const char *)
void restore_selected_frame(frame_id frame_id, int frame_level) noexcept
void reinit_frame_cache(void)
void save_selected_frame(frame_id *frame_id, int *frame_level) noexcept
frame_info_ptr get_selected_frame(const char *message)
void print_stack_frame(frame_info_ptr, int print_level, enum print_what print_what, int set_current_sal)
void print_stack_frame_to_uiout(struct ui_out *uiout, frame_info_ptr, int print_level, enum print_what print_what, int set_current_sal)
void execute_command_to_string(std::string &res, const char *p, int from_tty, bool term_out)
void execute_command(const char *, int)
all_threads_safe_range all_threads_safe()
all_matching_threads_range all_threads(process_stratum_target *proc_target=nullptr, ptid_t filter_ptid=minus_one_ptid)
all_non_exited_threads_range all_non_exited_threads(process_stratum_target *proc_target=nullptr, ptid_t filter_ptid=minus_one_ptid)
struct thread_info * inferior_thread(void)
void switch_to_thread(struct thread_info *thr)
#define threads_debug_printf(fmt,...)
gdb::ref_ptr< struct thread_info, refcounted_object_ref_policy > thread_info_ref
intrusive_list< thread_info, thread_step_over_list_node > thread_step_over_list
mach_port_t kern_return_t mach_port_t mach_msg_type_name_t msgportsPoly mach_port_t kern_return_t pid_t pid mach_port_t kern_return_t mach_port_t task mach_port_t kern_return_t int flags
mach_port_t mach_port_t name mach_port_t mach_port_t name kern_return_t int int rusage_t pid_t pid
struct inferior * find_inferior_ptid(process_stratum_target *targ, ptid_t ptid)
void set_current_inferior(struct inferior *inf)
struct inferior * current_inferior(void)
void switch_to_inferior_no_thread(inferior *inf)
intrusive_list< inferior > inferior_list
struct inferior * find_inferior_id(int num)
all_inferiors_range all_inferiors(process_stratum_target *proc_target=nullptr)
all_non_exited_inferiors_range all_non_exited_inferiors(process_stratum_target *proc_target=nullptr)
thread_step_over_list global_thread_step_over_list
#define infrun_debug_printf(fmt,...)
void clear_inline_frame_state(process_stratum_target *target, ptid_t filter_ptid)
const struct language_defn * current_language
enum language set_language(enum language lang)
observable< ptid_t > thread_stop_requested
observable< struct thread_info * > new_thread
observable< struct thread_info *, int > thread_exit
observable< user_selected_what > user_selected_context_changed
observable< process_stratum_target *, ptid_t, ptid_t > thread_ptid_changed
observable< ptid_t > target_resumed
bool process_options(const char **args, process_options_mode mode, gdb::array_view< const option_def_group > options_group)
@ PROCESS_OPTIONS_UNKNOWN_IS_ERROR
@ PROCESS_OPTIONS_UNKNOWN_IS_OPERAND
std::string build_help(const char *help_tmpl, gdb::array_view< const option_def_group > options_group)
void complete_on_all_options(completion_tracker &tracker, gdb::array_view< const option_def_group > options_group)
bool complete_options(completion_tracker &tracker, const char **args, process_options_mode mode, gdb::array_view< const option_def_group > options_group)
void set_current_program_space(struct program_space *pspace)
void frame_apply_all_cmd_completer(struct cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *)
const option_def & def() const
enum language la_language
virtual ~private_thread_info()=0
const char * shortname() const
target_waitstatus & set_spurious()
CORE_ADDR step_range_start
struct breakpoint * exception_resume_breakpoint
struct breakpoint * step_resume_breakpoint
struct breakpoint * single_step_breakpoints
struct target_waitstatus waitstatus
int target_core_of_thread(ptid_t ptid)
void target_update_thread_list(void)
struct thread_info * target_thread_handle_to_thread_info(const gdb_byte *thread_handle, int handle_len, struct inferior *inf)
int target_has_registers()
const char * target_thread_name(struct thread_info *info)
const char * target_extra_thread_info(thread_info *tp)
std::string target_pid_to_str(ptid_t ptid)
int target_thread_alive(ptid_t ptid)
void switch_to_thread(thread_info *thr)
void delete_exception_resume_breakpoint(struct thread_info *tp)
thread_info * any_thread_of_inferior(inferior *inf)
static thread_info * current_thread_
static const gdb::option::flag_option_def ascending_option_def
static bool set_running_thread(struct thread_info *tp, bool running)
bool switch_to_thread_if_alive(thread_info *thr)
int thread_step_over_chain_length(const thread_step_over_list &l)
struct thread_info * add_thread(process_stratum_target *targ, ptid_t ptid)
static const gdb::option::option_def thr_qcs_flags_option_defs[]
const char * thread_state_string(enum thread_state state)
static void tfaas_command(const char *cmd, int from_tty)
void global_thread_step_over_chain_enqueue_chain(thread_step_over_list &&list)
static void thread_apply_all_command_completer(cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *word)
int thread_count(process_stratum_target *proc_target)
void global_thread_step_over_chain_enqueue(struct thread_info *tp)
struct cmd_list_element * thread_cmd_list
bool threads_are_executing(process_stratum_target *target)
struct thread_info * add_thread_silent(process_stratum_target *targ, ptid_t ptid)
static bool is_current_thread(const thread_info *thr)
thread_info * first_thread_of_inferior(inferior *inf)
static const struct internalvar_funcs gthread_funcs
void delete_step_resume_breakpoint(struct thread_info *tp)
void print_selected_thread_frame(struct ui_out *uiout, user_selected_what selection)
void push_thread_stack_temporary(thread_info *tp, struct value *v)
void delete_thread(thread_info *thread)
void switch_to_thread_no_regs(struct thread_info *thread)
static bool tp_array_compar_descending(const thread_info_ref &a, const thread_info_ref &b)
int show_inferior_qualified_tids(void)
void validate_registers_access(void)
static void info_threads_command(const char *arg, int from_tty)
static struct value * thread_num_make_value_helper(struct gdbarch *gdbarch, int global)
bool value_in_thread_stack_temporaries(struct value *val, thread_info *tp)
static void thread_apply_command(const char *tidlist, int from_tty)
static void show_print_thread_events(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
int valid_global_thread_id(int global_id)
static std::array< gdb::option::option_def_group, 2 > make_thread_apply_all_options_def_group(bool *ascending, qcs_flags *flags)
static void update_threads_executing(void)
bool can_access_registers_thread(thread_info *thread)
int show_thread_that_caused_stop(void)
static void info_threads_command_completer(struct cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *word_ignored)
value * get_last_thread_stack_temporary(thread_info *tp)
static struct value * thread_id_per_inf_num_make_value(struct gdbarch *gdbarch, struct internalvar *var, void *ignore)
static void delete_thread_1(thread_info *thr, bool silent)
static bool tp_array_compar_ascending(const thread_info_ref &a, const thread_info_ref &b)
struct thread_info * find_thread_ptid(process_stratum_target *targ, ptid_t ptid)
static void show_debug_threads(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
void set_stop_requested(process_stratum_target *targ, ptid_t ptid, bool stop)
struct thread_info * iterate_over_threads(int(*callback)(struct thread_info *, void *), void *data)
struct thread_info * find_thread_global_id(int global_id)
static void taas_command(const char *cmd, int from_tty)
int pc_in_thread_step_range(CORE_ADDR pc, struct thread_info *thread)
void finish_thread_state(process_stratum_target *targ, ptid_t ptid)
thread_info * any_live_thread_of_inferior(inferior *inf)
static void thread_apply_command_completer(cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *)
void update_thread_list(void)
void set_executing(process_stratum_target *targ, ptid_t ptid, bool executing)
struct thread_info * inferior_thread(void)
void set_thread_exited(thread_info *tp, bool silent)
static gdb::option::option_def_group make_thread_apply_options_def_group(qcs_flags *flags)
void thread_command(const char *tidstr, int from_tty)
static void delete_thread_breakpoint(struct breakpoint **bp_p)
static void thread_find_command(const char *arg, int from_tty)
void thread_try_catch_cmd(thread_info *thr, gdb::optional< int > ada_task, const char *cmd, int from_tty, const qcs_flags &flags)
void set_running(process_stratum_target *targ, ptid_t ptid, bool running)
int thread_has_single_step_breakpoint_here(struct thread_info *tp, const address_space *aspace, CORE_ADDR addr)
bool thread_stack_temporaries_enabled_p(thread_info *tp)
static int highest_thread_num
void global_thread_step_over_chain_remove(struct thread_info *tp)
static std::string thread_target_id_str(thread_info *tp)
static struct thread_info * new_thread(struct inferior *inf, ptid_t ptid)
void thread_change_ptid(process_stratum_target *targ, ptid_t old_ptid, ptid_t new_ptid)
static int live_threads_count(void)
static void delete_at_next_stop(struct breakpoint **bp)
void set_resumed(process_stratum_target *targ, ptid_t ptid, bool resumed)
static struct value * inferior_thread_count_make_value(struct gdbarch *gdbarch, struct internalvar *var, void *ignore)
static void thread_apply_all_command(const char *cmd, int from_tty)
int thread_has_single_step_breakpoints_set(struct thread_info *tp)
const char * thread_name(thread_info *thread)
static int should_print_thread(const char *requested_threads, int default_inf_num, int global_ids, int pid, struct thread_info *thr)
int thread_is_in_step_over_chain(struct thread_info *tp)
static const gdb::option::option_def info_threads_option_defs[]
static bool thread_alive(thread_info *tp)
#define THREAD_APPLY_OPTION_HELP
struct thread_info * find_thread_by_handle(gdb::array_view< const gdb_byte > handle, struct inferior *inf)
void _initialize_thread()
static void thread_name_command(const char *arg, int from_tty)
static void print_thread_info_1(struct ui_out *uiout, const char *requested_threads, int global_ids, int pid, int show_global_ids)
void delete_single_step_breakpoints(struct thread_info *tp)
static void clear_thread_inferior_resources(struct thread_info *tp)
bool in_thread_list(process_stratum_target *targ, ptid_t ptid)
void switch_to_no_thread()
void print_thread_info(struct ui_out *uiout, const char *requested_threads, int pid)
void thread_cancel_execution_command(struct thread_info *thr)
const char * print_thread_id(struct thread_info *thr)
void thread_select(const char *tidstr, thread_info *tp)
static struct thread_info * find_thread_id(struct inferior *inf, int thr_num)
void delete_exited_threads(void)
void delete_thread_silent(thread_info *thread)
static const struct internalvar_funcs thread_funcs
static struct value * global_thread_id_make_value(struct gdbarch *gdbarch, struct internalvar *var, void *ignore)
static gdb::option::option_def_group make_info_threads_options_def_group(info_threads_opts *it_opts)
static const struct internalvar_funcs inferior_thread_count_funcs
void init_thread_list(void)
struct thread_info * add_thread_with_info(process_stratum_target *targ, ptid_t ptid, private_thread_info *priv)
struct thread_info * parse_thread_id(const char *tidstr, const char **end)
int tid_is_in_list(const char *list, int default_inferior, int inf_num, int thr_num)
void ATTRIBUTE_NORETURN invalid_thread_id_error(const char *string)
void gdb_printf(struct ui_file *stream, const char *format,...)
struct internalvar * create_internalvar_type_lazy(const char *name, const struct internalvar_funcs *funcs, void *data)
struct value * value_from_longest(struct type *type, LONGEST num)