From: Markus Metzger Date: Thu, 1 Feb 2018 13:31:18 +0000 (+0100) Subject: btrace: fix output of "set record btrace" X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b85310e1ec0419c4e1ca091cdd48f7597ebbefd3;p=binutils-gdb.git btrace: fix output of "set record btrace" 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. gdb/ * record-btrace.c (cmd_set_record_btrace): Print sub-commands. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f379680b2cb..c3f59e6b93a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2018-04-13 Markus Metzger + + * record-btrace.c (cmd_set_record_btrace): Print sub-commands. + 2018-04-13 Markus Metzger * infrun.c (process_event_stop_test): Call diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c index 7264b8ed2b6..455e25456be 100644 --- a/gdb/record-btrace.c +++ b/gdb/record-btrace.c @@ -2958,7 +2958,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 appropriate subcommand.\n")); + help_list (set_record_btrace_cmdlist, "set record btrace ", + all_commands, gdb_stdout); } /* The "show record btrace" command. */