Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH v2 1/2] btrace: fix output of "set record btrace"
@ 2018-03-05 10:59 Markus Metzger
  2018-03-05 10:59 ` [PATCH v2 2/2] btrace: set/show record btrace cpu Markus Metzger
  2018-03-05 16:35 ` [PATCH v2 1/2] btrace: fix output of "set record btrace" Alan Hayward
  0 siblings, 2 replies; 6+ messages in thread
From: Markus Metzger @ 2018-03-05 10:59 UTC (permalink / raw)
  To: gdb-patches

Instead of giving a message that "set record btrace" needs a sub-command,
GDB crashed.  Fix it.  A regression test comes with the next patch.

2018-03-05  Markus Metzger  <markus.t.metzger@intel.com>

gdb/
	* record-btrace.c (cmd_set_record_btrace): Print sub-commands.
---
 gdb/record-btrace.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c
index 48eda54..905f0c4 100644
--- a/gdb/record-btrace.c
+++ b/gdb/record-btrace.c
@@ -2953,7 +2953,10 @@ cmd_record_btrace_start (const char *args, int from_tty)
 static void
 cmd_set_record_btrace (const char *args, int from_tty)
 {
-  cmd_show_list (set_record_btrace_cmdlist, from_tty, "");
+  printf_unfiltered (_("\"set record btrace\" must be followed "
+		       "by an apporpriate subcommand.\n"));
+  help_list (set_record_btrace_cmdlist, "set record btrace ",
+	     all_commands, gdb_stdout);
 }
 
 /* The "show record btrace" command.  */
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-03-06  9:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-05 10:59 [PATCH v2 1/2] btrace: fix output of "set record btrace" Markus Metzger
2018-03-05 10:59 ` [PATCH v2 2/2] btrace: set/show record btrace cpu Markus Metzger
2018-03-05 16:16   ` Eli Zaretskii
2018-03-05 16:35 ` [PATCH v2 1/2] btrace: fix output of "set record btrace" Alan Hayward
2018-03-05 16:55   ` Metzger, Markus T
2018-03-06  9:34     ` Alan Hayward

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox