This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 1/2] btrace: fix output of "set record btrace"
- From: Alan Hayward <Alan dot Hayward at arm dot com>
- To: Markus Metzger <markus dot t dot metzger at intel dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, nd <nd at arm dot com>
- Date: Mon, 5 Mar 2018 16:35:38 +0000
- Subject: Re: [PATCH v2 1/2] btrace: fix output of "set record btrace"
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alan dot Hayward at arm dot com;
- Nodisclaimer: True
- References: <1520247555-4643-1-git-send-email-markus.t.metzger@intel.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
> On 5 Mar 2018, at 10:59, Markus Metzger <markus.t.metzger@intel.com> wrote:
>
> 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"));
appropriate not apporpriate.
Otherwise, looks ok to me, and works when I tested it.
> + help_list (set_record_btrace_cmdlist, "set record btrace ",
> + all_commands, gdb_stdout);
> }
>
> /* The "show record btrace" command. */
> --
> 1.8.3.1
>