From: Andrew Cagney Date: Tue, 18 Sep 2001 05:00:51 +0000 (+0000) Subject: Add ui_out parameter to libgdb functions. X-Git-Tag: cygnus_cvs_20020108_pre~1345 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2b65245ef4e04dd3ab045f0207aee8efbfd0a8ae;p=platform%2Fupstream%2Fbinutils.git Add ui_out parameter to libgdb functions. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a835ab8..90d0228 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,18 @@ +2001-09-18 Andrew Cagney + + * 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 From Ilya Golubev : diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index a0ba366..2ce0970 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 aa75612..737ac82 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 5c73437..2bd27c3 100644 --- a/gdb/mi/ChangeLog +++ b/gdb/mi/ChangeLog @@ -1,3 +1,12 @@ +2001-09-18 Andrew Cagney + + * 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 * 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 916acfa..75e100f 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 464e5bc..eac8835 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 668fcca..f3e205f 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'. */