diff options
author | Tom Tromey <tom@tromey.com> | 2018-09-14 07:34:05 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-09-16 06:25:16 -0600 |
commit | f4bab6ff22a0ddb799c1c492117a15fe0501ff1e (patch) | |
tree | b1b954858fd466e32bcf192893fb4158282fc281 /gdb | |
parent | db4cc66567397498a9e9eaedb8d0bb8889744ef7 (diff) | |
download | gdb-f4bab6ff22a0ddb799c1c492117a15fe0501ff1e.zip gdb-f4bab6ff22a0ddb799c1c492117a15fe0501ff1e.tar.gz gdb-f4bab6ff22a0ddb799c1c492117a15fe0501ff1e.tar.bz2 |
Expand "show disassembler-options" output
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-16 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.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/disasm.c | 13 |
2 files changed, 15 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index da9b450..095c6b5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2018-09-16 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. + 2018-09-15 Tom Tromey <tom@tromey.com> * infcmd.c (get_inferior_args): Return const char *. diff --git a/gdb/disasm.c b/gdb/disasm.c index 11793df..de1c7dc 100644 --- a/gdb/disasm.c +++ b/gdb/disasm.c @@ -1008,19 +1008,24 @@ show_disassembler_options_sfunc (struct ui_file *file, int from_tty, if (options == NULL) options = ""; - fprintf_filtered (file, _("The current disassembler options are '%s'\n"), + fprintf_filtered (file, _("The current disassembler options are '%s'\n\n"), options); 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; + } valid_options = &valid_options_and_args->options; - fprintf_filtered (file, _("\n\ + fprintf_filtered (file, _("\ The following disassembler options are supported for use with the\n\ -'set disassembler-options <option>[,<option>...]' command:\n")); +'set disassembler-options OPTION [,OPTION]...' command:\n")); if (valid_options->description != NULL) { |