This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] btrace: fix output of "set record btrace"
- From: Markus Metzger <mmetzger at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 13 Apr 2018 09:45:36 -0000
- Subject: [binutils-gdb] btrace: fix output of "set record btrace"
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b85310e1ec0419c4e1ca091cdd48f7597ebbefd3
commit b85310e1ec0419c4e1ca091cdd48f7597ebbefd3
Author: Markus Metzger <markus.t.metzger@intel.com>
Date: Thu Feb 1 14:31:18 2018 +0100
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:
---
gdb/ChangeLog | 4 ++++
gdb/record-btrace.c | 5 ++++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f379680..c3f59e6 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
+ * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
+
+2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
+
* infrun.c (process_event_stop_test): Call
gdbarch_in_indirect_branch_thunk.
* gdbarch.sh (in_indirect_branch_thunk): New.
diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c
index 7264b8e..455e254 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. */