From ad443146120571d6513cb302e85e291b32cc3420 Mon Sep 17 00:00:00 2001 From: Stan Shebs Date: Thu, 8 Apr 2010 23:13:46 +0000 Subject: [PATCH] 2010-04-08 Stan Shebs * breakpoint.c (default_collect_info): New function. (breakpoints_info): Call it. (maintenance_info_breakpoints): Ditto. (tracepoints_info): Ditto. --- gdb/ChangeLog | 7 +++++++ gdb/breakpoint.c | 25 +++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0a648e5..5113eca 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2010-04-08 Stan Shebs + + * breakpoint.c (default_collect_info): New function. + (breakpoints_info): Call it. + (maintenance_info_breakpoints): Ditto. + (tracepoints_info): Ditto. + 2010-04-08 H.J. Lu * i387-tdep.c (i387_collect_xsave): Re-indent. diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index c1c8b97..213d96c 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -5052,6 +5052,25 @@ breakpoint_1 (int bnum, int allflag, int (*filter) (const struct breakpoint *)) return nr_printable_breakpoints; } +/* Display the value of default-collect in a way that is generally + compatible with the breakpoint list. */ + +static void +default_collect_info (void) +{ + /* If it has no value (which is frequently the case), say nothing; a + message like "No default-collect." gets in user's face when it's + not wanted. */ + if (!*default_collect) + return; + + /* The following phrase lines up nicely with per-tracepoint collect + actions. */ + ui_out_text (uiout, "default collect "); + ui_out_field_string (uiout, "default-collect", default_collect); + ui_out_text (uiout, " \n"); +} + static void breakpoints_info (char *bnum_exp, int from_tty) { @@ -5061,6 +5080,8 @@ breakpoints_info (char *bnum_exp, int from_tty) bnum = parse_and_eval_long (bnum_exp); breakpoint_1 (bnum, 0, NULL); + + default_collect_info (); } static void @@ -5091,6 +5112,8 @@ maintenance_info_breakpoints (char *bnum_exp, int from_tty) bnum = parse_and_eval_long (bnum_exp); breakpoint_1 (bnum, 1, NULL); + + default_collect_info (); } static int @@ -10462,6 +10485,8 @@ tracepoints_info (char *tpnum_exp, int from_tty) else ui_out_message (uiout, 0, "No tracepoint number %d.\n", tpnum); } + + default_collect_info (); } /* The 'enable trace' command enables tracepoints. -- 2.7.4