ubsan: bpf: left shift cannot be represented in type 'DI' (aka 'long')
[deliverable/binutils-gdb.git] / gdb / thread.c
index 485c996e146f597de3208af651bc76c04b971230..a210d328ed0e9ec148a7ec52aa8fcc7c8cac05cc 100644 (file)
@@ -444,7 +444,7 @@ thread_step_over_chain_remove (struct thread_info *tp)
   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.  */
@@ -709,7 +709,7 @@ delete_exited_threads (void)
       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
@@ -1204,7 +1204,7 @@ print_thread_info (struct ui_out *uiout, const char *requested_threads,
 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[] = {
@@ -1574,7 +1574,7 @@ static const gdb::option::option_def thr_qcs_flags_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 {{
@@ -1603,7 +1603,7 @@ make_thread_apply_options_def_group (qcs_flags *flags)
 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,
@@ -1818,6 +1818,8 @@ thread_apply_command (const char *tidlist, int from_tty)
 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);
 }
@@ -1827,6 +1829,8 @@ taas_command (const char *cmd, int 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);
@@ -1951,7 +1955,7 @@ thread_find_command (const char *arg, int 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)
@@ -2150,7 +2154,7 @@ Options:\n\
 
   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"
@@ -2166,7 +2170,7 @@ THREAD_APPLY_OPTION_HELP),
   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"
This page took 0.027756 seconds and 4 git commands to generate.