Add ui_out parameter to libgdb functions.
authorAndrew Cagney <cagney@redhat.com>
Tue, 18 Sep 2001 05:00:51 +0000 (05:00 +0000)
committerAndrew Cagney <cagney@redhat.com>
Tue, 18 Sep 2001 05:00:51 +0000 (05:00 +0000)
gdb/ChangeLog
gdb/breakpoint.c
gdb/gdb.h
gdb/mi/ChangeLog
gdb/mi/mi-cmd-break.c
gdb/mi/mi-main.c
gdb/thread.c

index a835ab8b2392a42707ed5209527efc4f5e364e3b..90d02287da78101f1bd6a0c4f5f4309c37931087 100644 (file)
@@ -1,3 +1,18 @@
+2001-09-18  Andrew Cagney  <ac131313@redhat.com>
+
+       * thread.c (do_captured_thread_select): Add uiout parameter.
+       (do_captured_list_thread_ids): Ditto.
+       * breakpoint.c (do_captured_breakpoint_query): Ditto.
+
+       * breakpoint.c (gdb_breakpoint_query): Update.  Use
+       catch_exceptions.
+       * thread.c (gdb_list_thread_ids): Ditto.
+       (gdb_thread_select): Ditto.
+       (thread_command): Pass uiout to gdb_thread_select.
+
+       * gdb.h (gdb_breakpoint_query): Add parameter ui_out.
+       (gdb_thread_select, gdb_list_thread_ids): Ditto.
+
 2001-09-13  Kevin Buettner  <kevinb@redhat.com>
 
        From Ilya Golubev <gin@mo.msk.ru>:
index a0ba366c26b8b98505dfe350e744073bf42b9692..2ce097006e78abdcbc8379316a3d86b3aadd6ae7 100644 (file)
@@ -3526,7 +3526,7 @@ struct captured_breakpoint_query_args
   };
 
 static int
-do_captured_breakpoint_query (void *data)
+do_captured_breakpoint_query (struct ui_out *uiout, void *data)
 {
   struct captured_breakpoint_query_args *args = data;
   register struct breakpoint *b;
@@ -3543,14 +3543,14 @@ do_captured_breakpoint_query (void *data)
 }
 
 enum gdb_rc
-gdb_breakpoint_query (/* output object, */ int bnum)
+gdb_breakpoint_query (struct ui_out *uiout, int bnum)
 {
   struct captured_breakpoint_query_args args;
   args.bnum = bnum;
   /* For the moment we don't trust print_one_breakpoint() to not throw
      an error. */
-  return catch_errors (do_captured_breakpoint_query, &args,
-                      NULL, RETURN_MASK_ALL);
+  return catch_exceptions (uiout, do_captured_breakpoint_query, &args,
+                          NULL, RETURN_MASK_ALL);
 }
 
 /* Return non-zero if B is user settable (breakpoints, watchpoints,
index aa75612a6c62241accb3c62540212999de6f4507..737ac82edfe24c78a0513cead332fc6e09aafa4f 100644 (file)
--- a/gdb/gdb.h
+++ b/gdb/gdb.h
@@ -44,7 +44,7 @@ enum gdb_rc {
 
 /* Print the specified breakpoint on GDB_STDOUT. (Eventually this
    function will ``print'' the object on ``output''). */
-enum gdb_rc gdb_breakpoint_query (/* struct {ui,gdb}_out *output, */ int bnum);
+enum gdb_rc gdb_breakpoint_query (struct ui_out *uiout, int bnum);
 
 /* Create a breakpoint at ADDRESS (a GDB source and line). */
 enum gdb_rc gdb_breakpoint (char *address, char *condition,
@@ -52,9 +52,9 @@ enum gdb_rc gdb_breakpoint (char *address, char *condition,
                            int thread, int ignore_count);
 
 /* Switch thread and print notification. */
-enum gdb_rc gdb_thread_select (/* output object */ char *tidstr);
+enum gdb_rc gdb_thread_select (struct ui_out *uiout, char *tidstr);
 
 /* Print a list of known thread ids. */
-enum gdb_rc gdb_list_thread_ids (/* output object */);
+enum gdb_rc gdb_list_thread_ids (struct ui_out *uiout);
 
 #endif
index 5c7343743510272080bb5b26ef4f9107d5a5189e..2bd27c39edb8ce98d5c9c3ca898996f53811e7a0 100644 (file)
@@ -1,3 +1,12 @@
+2001-09-18  Andrew Cagney  <ac131313@redhat.com>
+
+       * mi-main.c (mi_cmd_thread_select): Pass uiout to
+       gdb_thread_select.
+       (mi_cmd_thread_list_ids): Pass uiout to gdb_list_thread_ids.
+
+       * mi-cmd-break.c (breakpoint_notify): Pass uiout to
+       gdb_breakpoint_query.
+
 2001-08-17  Keith Seitz  <keiths@redhat.com>
 
        * mi-cmd-var.c (varobj_update_one): Update call to
index 916acfa51b052027cbd0639c3a2904c074585196..75e100f9ca7a0ffc927fb552b31b9a75b4a08af8 100644 (file)
@@ -44,7 +44,7 @@ enum
 static void
 breakpoint_notify (int b)
 {
-  gdb_breakpoint_query (b);
+  gdb_breakpoint_query (uiout, b);
 }
 
 
index 464e5bc8f36a2f0e4c89d90b08c96d975433e591..eac883547c410161eb71e2f645e9fec20b58441e 100644 (file)
@@ -230,7 +230,7 @@ mi_cmd_thread_select (char *command, char **argv, int argc)
       return MI_CMD_ERROR;
     }
   else
-    rc = gdb_thread_select (argv[0]);
+    rc = gdb_thread_select (uiout, argv[0]);
 
   if (rc == GDB_RC_FAIL)
     return MI_CMD_CAUGHT_ERROR;
@@ -251,7 +251,7 @@ mi_cmd_thread_list_ids (char *command, char **argv, int argc)
     }
   else
 #ifdef UI_OUT
-    rc = gdb_list_thread_ids ();
+    rc = gdb_list_thread_ids (uiout);
 #endif
 
   if (rc == GDB_RC_FAIL)
index 668fccafcb501794796da84b38c48e7be58e2714..f3e205fc3af9538518e3ebc6c622414fa9e78173 100644 (file)
@@ -257,7 +257,8 @@ in_thread_list (ptid_t ptid)
 /* Print a list of thread ids currently known, and the total number of
    threads. To be used from within catch_errors. */
 static int 
-do_captured_list_thread_ids (void *arg)
+do_captured_list_thread_ids (struct ui_out *uiout,
+                            void *arg)
 {
   struct thread_info *tp;
   int num = 0;
@@ -278,10 +279,10 @@ do_captured_list_thread_ids (void *arg)
 /* Official gdblib interface function to get a list of thread ids and
    the total number. */
 enum gdb_rc
-gdb_list_thread_ids (/* output object */)
+gdb_list_thread_ids (struct ui_out *uiout)
 {
-  return catch_errors (do_captured_list_thread_ids, NULL,
-                      NULL, RETURN_MASK_ALL);
+  return catch_exceptions (uiout, do_captured_list_thread_ids, NULL,
+                          NULL, RETURN_MASK_ALL);
 }
 #endif
 
@@ -683,11 +684,12 @@ thread_command (char *tidstr, int from_tty)
       return;
     }
 
-  gdb_thread_select (tidstr);
+  gdb_thread_select (uiout, tidstr);
 }
 
 static int
-do_captured_thread_select (void *tidstr)
+do_captured_thread_select (struct ui_out *uiout,
+                          void *tidstr)
 {
   int num;
   struct thread_info *tp;
@@ -736,10 +738,11 @@ see the IDs of currently known threads.", num);
 }
 
 enum gdb_rc
-gdb_thread_select (char *tidstr)
+gdb_thread_select (struct ui_out *uiout,
+                  char *tidstr)
 {
-  return catch_errors (do_captured_thread_select, tidstr,
-                      NULL, RETURN_MASK_ALL);
+  return catch_exceptions (uiout, do_captured_thread_select, tidstr,
+                          NULL, RETURN_MASK_ALL);
 }
 
 /* Commands with a prefix of `thread'.  */
This page took 0.035546 seconds and 4 git commands to generate.