Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 1/3] Expand "show disassembler-options" output
Date: Sun, 16 Sep 2018 03:12:00 -0000	[thread overview]
Message-ID: <7ebd9559-e2cc-bda5-3f6e-97f6e57ee769@simark.ca> (raw)
In-Reply-To: <20180915025522.18723-2-tom@tromey.com>

On 2018-09-14 10:55 p.m., Tom Tromey wrote:
> I typed this:
> 
>     (gdb) help set disassembler-options
>     Set the disassembler options.
>     Usage: set disassembler-options OPTION [,OPTION]...
> 
>     See: 'show disassembler-options' for valid option values.
> 
> ... so I tried what it said and got:
> 
>     (gdb) show disassembler-options
>     The current disassembler options are ''
> 
> This surprised me a little, so this patch adds some text to explain
> the situation when an architecture does not have disassembler options.
> 
> While there I noticed one more spot where gdb was not using the GNU
> style for metasyntactic variables.  This patch fixes this as well.
> 
> gdb/ChangeLog
> 2018-09-14  Tom Tromey  <tom@tromey.com>
> 
> 	* disasm.c (show_disassembler_options_sfunc): Use GNU style for
> 	metasyntactic variables.  Print message if no disassembler options
> 	are available.
> ---
>  gdb/ChangeLog | 6 ++++++
>  gdb/disasm.c  | 9 +++++++--
>  2 files changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/gdb/disasm.c b/gdb/disasm.c
> index 11793df67c0..d908af3fb43 100644
> --- a/gdb/disasm.c
> +++ b/gdb/disasm.c
> @@ -1014,13 +1014,18 @@ show_disassembler_options_sfunc (struct ui_file *file, int from_tty,
>    valid_options_and_args = gdbarch_valid_disassembler_options (gdbarch);
>  
>    if (valid_options_and_args == NULL)
> -    return;
> +    {
> +      fputs_filtered (_("(There are no disassembler options available "
> +			"for this architecture.)\n"),
> +		      file);
> +      return;
> +    }

It's probably a matter of taste, but I would use the same format as the message
shown when there are options available: no parenthesis and an empty line before.

Otherwise, this LGTM.

Simon


  reply	other threads:[~2018-09-16  3:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-15  2:55 [PATCH 0/3] More use of GNU-style metasyntactic variables Tom Tromey
2018-09-15  2:55 ` [PATCH 2/3] Use GNU style for metasyntactic variables in gdb Tom Tromey
2018-09-16  3:17   ` Simon Marchi
2018-09-16 12:13     ` Tom Tromey
2018-09-16  3:20   ` Simon Marchi
2018-09-16 12:16     ` Tom Tromey
2018-09-16 12:42     ` Tom Tromey
2018-09-15  2:55 ` [PATCH 3/3] Use GNU style for metasyntactic variables in gdbserver Tom Tromey
2018-09-16  3:17   ` Simon Marchi
2018-09-15  2:55 ` [PATCH 1/3] Expand "show disassembler-options" output Tom Tromey
2018-09-16  3:12   ` Simon Marchi [this message]
2018-09-16 12:18     ` Tom Tromey

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=7ebd9559-e2cc-bda5-3f6e-97f6e57ee769@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.com \
    /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