Automatic date update in version.in
[deliverable/binutils-gdb.git] / gdb / thread.c
index 3cd588e0b121b68ee166990283ffcfe201a397f0..f850f05ad48e45079d7e93e4f4f309959914cfaa 100644 (file)
@@ -1184,8 +1184,7 @@ print_thread_info_1 (struct ui_out *uiout, const char *requested_threads,
            }
          else
            {
-             uiout->field_string ("target-id",
-                                  thread_target_id_str (tp).c_str ());
+             uiout->field_string ("target-id", thread_target_id_str (tp));
            }
 
          if (tp->state == THREAD_RUNNING)
@@ -1977,7 +1976,7 @@ print_selected_thread_frame (struct ui_out *uiout,
          uiout->text ("[Switching to thread ");
          uiout->field_string ("new-thread-id", print_thread_id (tp));
          uiout->text (" (");
-         uiout->text (target_pid_to_str (inferior_ptid).c_str ());
+         uiout->text (target_pid_to_str (inferior_ptid));
          uiout->text (")]");
        }
     }
@@ -2134,10 +2133,13 @@ Options:\n\
   c = add_info ("threads", info_threads_command, info_threads_help.c_str ());
   set_cmd_completer_handle_brkchars (c, info_threads_command_completer);
 
-  add_prefix_cmd ("thread", class_run, thread_command, _("\
+  cmd_list_element *thread_cmd
+    = add_prefix_cmd ("thread", class_run, thread_command, _("\
 Use this command to switch between threads.\n\
 The new thread ID must be currently known."),
-                 &thread_cmd_list, 1, &cmdlist);
+                     &thread_cmd_list, 1, &cmdlist);
+
+  add_com_alias ("t", thread_cmd, class_run, 1);
 
 #define THREAD_APPLY_OPTION_HELP "\
 Prints per-inferior thread number and target system's thread id\n\
@@ -2204,8 +2206,6 @@ Usage: thread find REGEXP\n\
 Will display thread ids whose name, target ID, or extra info matches REGEXP."),
           &thread_cmd_list);
 
-  add_com_alias ("t", "thread", class_run, 1);
-
   add_setshow_boolean_cmd ("thread-events", no_class,
                           &print_thread_events, _("\
 Set printing of thread events (such as thread start and exit)."), _("\
This page took 0.034605 seconds and 4 git commands to generate.