2005-02-02 Andrew Cagney <cagney@gnu.org>
[deliverable/binutils-gdb.git] / gdb / thread.c
index 16645927720c133aa6b71c1be7460787e7e47a6b..ecdbe5e4c37b0aa11949a6e14b32a507b525b6ac 100644 (file)
@@ -30,6 +30,7 @@
 #include "value.h"
 #include "target.h"
 #include "gdbthread.h"
+#include "exceptions.h"
 #include "command.h"
 #include "gdbcmd.h"
 #include "regcache.h"
@@ -281,10 +282,10 @@ do_captured_list_thread_ids (struct ui_out *uiout, void *arg)
 /* Official gdblib interface function to get a list of thread ids and
    the total number. */
 enum gdb_rc
-gdb_list_thread_ids (struct ui_out *uiout)
+gdb_list_thread_ids (struct ui_out *uiout, char **error_message)
 {
-  return catch_exceptions (uiout, do_captured_list_thread_ids, NULL,
-                          NULL, RETURN_MASK_ALL);
+  return catch_exceptions_with_msg (uiout, do_captured_list_thread_ids, NULL,
+                                   error_message, RETURN_MASK_ALL);
 }
 
 /* Load infrun state for the thread PID.  */
@@ -301,7 +302,6 @@ load_infrun_state (ptid_t ptid,
                   int *another_trap,
                   int *stepping_through_solib_after_catch,
                   bpstat *stepping_through_solib_catchpoints,
-                  int *stepping_through_sigtramp,
                   int *current_line,
                   struct symtab **current_symtab)
 {
@@ -325,7 +325,6 @@ load_infrun_state (ptid_t ptid,
     tp->stepping_through_solib_after_catch;
   *stepping_through_solib_catchpoints =
     tp->stepping_through_solib_catchpoints;
-  *stepping_through_sigtramp = tp->stepping_through_sigtramp;
   *current_line = tp->current_line;
   *current_symtab = tp->current_symtab;
 }
@@ -344,7 +343,6 @@ save_infrun_state (ptid_t ptid,
                   int another_trap,
                   int stepping_through_solib_after_catch,
                   bpstat stepping_through_solib_catchpoints,
-                  int stepping_through_sigtramp,
                   int current_line,
                   struct symtab *current_symtab)
 {
@@ -366,7 +364,6 @@ save_infrun_state (ptid_t ptid,
   tp->another_trap = another_trap;
   tp->stepping_through_solib_after_catch = stepping_through_solib_after_catch;
   tp->stepping_through_solib_catchpoints = stepping_through_solib_catchpoints;
-  tp->stepping_through_sigtramp = stepping_through_sigtramp;
   tp->current_line = current_line;
   tp->current_symtab = current_symtab;
 }
@@ -411,7 +408,7 @@ info_threads_command (char *arg, int from_tty)
   struct thread_info *tp;
   ptid_t current_ptid;
   struct frame_info *cur_frame;
-  struct frame_id saved_frame_id = get_frame_id (get_selected_frame ());
+  struct frame_id saved_frame_id = get_frame_id (get_selected_frame (NULL));
   char *extra_info;
 
   prune_threads ();
@@ -432,7 +429,7 @@ info_threads_command (char *arg, int from_tty)
       puts_filtered ("  ");
 
       switch_to_thread (tp->ptid);
-      print_stack_frame (get_selected_frame (), 0, LOCATION);
+      print_stack_frame (get_selected_frame (NULL), 0, LOCATION);
     }
 
   switch_to_thread (current_ptid);
@@ -446,7 +443,7 @@ info_threads_command (char *arg, int from_tty)
     {
       /* Ooops, can't restore, tell user where we are.  */
       warning ("Couldn't restore frame in current thread, at frame 0");
-      print_stack_frame (get_selected_frame (), 0, LOCATION);
+      print_stack_frame (get_selected_frame (NULL), 0, LOCATION);
     }
   else
     {
@@ -638,7 +635,7 @@ thread_command (char *tidstr, int from_tty)
       return;
     }
 
-  gdb_thread_select (uiout, tidstr);
+  gdb_thread_select (uiout, tidstr, NULL);
 }
 
 static int
@@ -665,15 +662,15 @@ do_captured_thread_select (struct ui_out *uiout, void *tidstr)
   ui_out_text (uiout, target_tid_to_str (inferior_ptid));
   ui_out_text (uiout, ")]");
 
-  print_stack_frame (get_selected_frame (), 1, SRC_AND_LOC);
+  print_stack_frame (get_selected_frame (NULL), 1, SRC_AND_LOC);
   return GDB_RC_OK;
 }
 
 enum gdb_rc
-gdb_thread_select (struct ui_out *uiout, char *tidstr)
+gdb_thread_select (struct ui_out *uiout, char *tidstr, char **error_message)
 {
-  return catch_exceptions (uiout, do_captured_thread_select, tidstr,
-                          NULL, RETURN_MASK_ALL);
+  return catch_exceptions_with_msg (uiout, do_captured_thread_select, tidstr,
+                                   error_message, RETURN_MASK_ALL);
 }
 
 /* Commands with a prefix of `thread'.  */
This page took 0.025854 seconds and 4 git commands to generate.