public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Markus Metzger <markus.t.metzger@intel.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 1/2] btrace: fix output of "set record btrace"
Date: Fri, 23 Feb 2018 09:52:00 -0000	[thread overview]
Message-ID: <1519379570-16643-1-git-send-email-markus.t.metzger@intel.com> (raw)

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-02-23  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 2464672..bc4566c 100644
--- a/gdb/record-btrace.c
+++ b/gdb/record-btrace.c
@@ -2955,7 +2955,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

             reply	other threads:[~2018-02-23  9:52 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-23  9:52 Markus Metzger [this message]
2018-02-23  9:52 ` [PATCH 2/2] btrace: set/show record btrace cpu Markus Metzger
2018-02-23 13:52   ` Eli Zaretskii
2018-02-26 15:45     ` Metzger, Markus T
2018-02-26 19:13       ` Eli Zaretskii
2018-02-27 11:41         ` Metzger, Markus T
2018-02-27 18:23           ` Eli Zaretskii
2018-02-28  7:38             ` Metzger, Markus T
2018-02-28 15:37               ` Eli Zaretskii
2018-03-01  7:05                 ` Metzger, Markus T
2018-03-01 14:48                   ` Eli Zaretskii
2018-03-01 16:24                     ` Metzger, Markus T
2018-03-01 19:08                       ` Eli Zaretskii
2018-03-02  7:09                         ` Metzger, Markus T
2018-03-02 14:50                           ` Maciej W. Rozycki
2018-03-02 15:39                             ` Eli Zaretskii
2018-03-02 19:04                               ` Maciej W. Rozycki
2018-03-02 19:49                               ` Maciej W. Rozycki
2018-03-05 10:58                                 ` Metzger, Markus T

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1519379570-16643-1-git-send-email-markus.t.metzger@intel.com \
    --to=markus.t.metzger@intel.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).