summaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2001-09-18 05:00:51 +0000
committerAndrew Cagney <cagney@redhat.com>2001-09-18 05:00:51 +0000
commit3f2b04f3f704a81982b791c2c8d7e7452661fecf (patch)
tree8bc4511914e94dfd6df898be1157eae145fbe814 /gdb
parent503917b47a48886f66f0c8ed8d48241d29c6f8e1 (diff)
downloadgdb-3f2b04f3f704a81982b791c2c8d7e7452661fecf.tar.gz
Add ui_out parameter to libgdb functions.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog15
-rw-r--r--gdb/breakpoint.c8
-rw-r--r--gdb/gdb.h6
-rw-r--r--gdb/mi/ChangeLog9
-rw-r--r--gdb/mi/mi-cmd-break.c2
-rw-r--r--gdb/mi/mi-main.c4
-rw-r--r--gdb/thread.c21
7 files changed, 46 insertions, 19 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a835ab8b239..90d02287da7 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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>:
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index a0ba366c26b..2ce097006e7 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -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,
diff --git a/gdb/gdb.h b/gdb/gdb.h
index aa75612a6c6..737ac82edfe 100644
--- 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
diff --git a/gdb/mi/ChangeLog b/gdb/mi/ChangeLog
index 5c734374351..2bd27c39edb 100644
--- a/gdb/mi/ChangeLog
+++ b/gdb/mi/ChangeLog
@@ -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
diff --git a/gdb/mi/mi-cmd-break.c b/gdb/mi/mi-cmd-break.c
index 916acfa51b0..75e100f9ca7 100644
--- a/gdb/mi/mi-cmd-break.c
+++ b/gdb/mi/mi-cmd-break.c
@@ -44,7 +44,7 @@ enum
static void
breakpoint_notify (int b)
{
- gdb_breakpoint_query (b);
+ gdb_breakpoint_query (uiout, b);
}
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 464e5bc8f36..eac883547c4 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -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)
diff --git a/gdb/thread.c b/gdb/thread.c
index 668fccafcb5..f3e205fc3af 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -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'. */