step_over_chain_remove (&step_over_queue_head, tp);
}
-/* Delete the thread referenced by THR. If SILENT, don't notifyi
+/* Delete the thread referenced by THR. If SILENT, don't notify
the observer of this exit.
THR must not be NULL or a failed assertion will be raised. */
delete_thread (tp);
}
-/* Return true value if stack temporaies are enabled for the thread
+/* Return true value if stack temporaries are enabled for the thread
TP. */
bool
}
if (show_global_ids || uiout->is_mi_like_p ())
- uiout->field_int ("id", tp->global_num);
+ uiout->field_signed ("id", tp->global_num);
/* For the CLI, we stuff everything into the target-id field.
This is a gross hack to make the output come out looking
core = target_core_of_thread (tp->ptid);
if (uiout->is_mi_like_p () && core != -1)
- uiout->field_int ("core", core);
+ uiout->field_signed ("core", core);
}
/* This end scope restores the current thread and the frame
if (pid == -1 && requested_threads == NULL)
{
if (uiout->is_mi_like_p () && inferior_ptid != null_ptid)
- uiout->field_int ("current-thread-id", current_thread->global_num);
+ uiout->field_signed ("current-thread-id", current_thread->global_num);
if (inferior_ptid != null_ptid && current_exited)
uiout->message ("\n\
struct info_threads_opts
{
/* For "-gid". */
- int show_global_ids = 0;
+ bool show_global_ids = false;
};
static const gdb::option::option_def info_threads_option_defs[] = {
ASCENDING and FLAGS as context. */
static inline std::array<gdb::option::option_def_group, 2>
-make_thread_apply_all_options_def_group (int *ascending,
+make_thread_apply_all_options_def_group (bool *ascending,
qcs_flags *flags)
{
return {{
static void
thread_apply_all_command (const char *cmd, int from_tty)
{
- int ascending = false;
+ bool ascending = false;
qcs_flags flags;
auto group = make_thread_apply_all_options_def_group (&ascending,
static void
taas_command (const char *cmd, int from_tty)
{
+ if (cmd == NULL || *cmd == '\0')
+ error (_("Please specify a command to apply on all threads"));
std::string expanded = std::string ("thread apply all -s ") + cmd;
execute_command (expanded.c_str (), from_tty);
}
static void
tfaas_command (const char *cmd, int from_tty)
{
+ if (cmd == NULL || *cmd == '\0')
+ error (_("Please specify a command to apply on all frames of all threads"));
std::string expanded
= std::string ("thread apply all -s -- frame apply all -s ") + cmd;
execute_command (expanded.c_str (), from_tty);
}
/* Print notices when new threads are attached and detached. */
-int print_thread_events = 1;
+bool print_thread_events = true;
static void
show_print_thread_events (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
if (uiout->is_mi_like_p ())
{
- uiout->field_int ("new-thread-id",
- inferior_thread ()->global_num);
+ uiout->field_signed ("new-thread-id",
+ inferior_thread ()->global_num);
}
else
{
const auto thread_apply_opts = make_thread_apply_options_def_group (nullptr);
- static std::string thread_apply_help = gdb::option::build_help (N_("\
+ static std::string thread_apply_help = gdb::option::build_help (_("\
Apply a command to a list of threads.\n\
Usage: thread apply ID... [OPTION]... COMMAND\n\
ID is a space-separated list of IDs of threads to apply COMMAND on.\n"
const auto thread_apply_all_opts
= make_thread_apply_all_options_def_group (nullptr, nullptr);
- static std::string thread_apply_all_help = gdb::option::build_help (N_("\
+ static std::string thread_apply_all_help = gdb::option::build_help (_("\
Apply a command to all threads.\n\
\n\
Usage: thread apply all [OPTION]... COMMAND\n"