diff options
author | Pedro Alves <palves@redhat.com> | 2019-06-13 00:06:53 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2019-06-13 00:18:41 +0100 |
commit | 2daf894ed0baf72dd3f422b7a71630145568db30 (patch) | |
tree | 1104f2bc9b33ebe06c6bc744d7c4cca29c04985c /gdb/valprint.c | |
parent | Migrate rest of compile commands to new options framework (diff) | |
download | binutils-gdb-2daf894ed0baf72dd3f422b7a71630145568db30.tar.gz binutils-gdb-2daf894ed0baf72dd3f422b7a71630145568db30.tar.bz2 binutils-gdb-2daf894ed0baf72dd3f422b7a71630145568db30.zip |
"set print raw frame-arguments" -> "set print raw-frame-arguments"
A following patch will introduce options for the "backtrace" command,
based on some "set print" and "set backtrace" settings. There's one
setting in particular that is a bit annoying if we want to describe
the backtrace options and the settings commands using the same data
structures:
"set print raw frame-arguments"
The problem is that space between "raw" and "frame-arguments".
Calling the option
"bt -raw frame-arguments"
would be odd. So I'm calling the option
"bt -raw-frame-arguments"
instead.
And for consistency, this patch renames the set/show commands to:
"set print raw-frame-arguments"
"show print raw-frame-arguments"
I.e., dash instead of space. The old commands are left in place, but
marked deprecated.
We need to adjust a couple testcases, because the relevant tests use
gdb_test_no_output and the old commands are no longer silent:
(gdb) set print raw frame-arguments on
Warning: command 'set print raw frame-arguments' is deprecated.
Use 'set print raw-frame-arguments'.
gdb/ChangeLog:
2019-06-13 Pedro Alves <palves@redhat.com>
* NEWS (Changed commands): Mention set/show print raw-frame-arguments,
and that "set/show print raw frame-arguments" are now deprecated.
* cli/cli-decode.c (add_setshow_boolean_cmd): Now returns the
command.
* command.h (add_setshow_boolean_cmd): Return cmd_list_element *.
* stack.c (_initialize_stack): Install "set/show print
raw-frame-arguments", and deprecate "set/show print raw
frame-arguments".
* valprint.c (_initialize_valprint): Deprecate "set/show print
raw".
gdb/doc/ChangeLog:
2019-06-13 Pedro Alves <palves@redhat.com>
* gdb.texinfo (Print Settings): Document "set/show print
raw-frame-arguments" instead of "set/show print raw
frame-arguments".
gdb/testsuite/ChangeLog:
2019-06-13 Pedro Alves <palves@redhat.com>
* gdb.guile/scm-frame-args.exp: Use "set print
raw-frame-arguments" instead of "set print raw frame-arguments".
* gdb.python/py-frame-args.exp: Likewise.
Diffstat (limited to 'gdb/valprint.c')
-rw-r--r-- | gdb/valprint.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/gdb/valprint.c b/gdb/valprint.c index e3197e69192..6f9b47da80c 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -3248,6 +3248,8 @@ make_value_print_options_def_group (value_print_options *opts) void _initialize_valprint (void) { + cmd_list_element *cmd; + add_prefix_cmd ("print", no_class, set_print, _("Generic command for setting how things print."), &setprintlist, "set print ", 0, &setlist); @@ -3261,13 +3263,18 @@ _initialize_valprint (void) add_alias_cmd ("p", "print", no_class, 1, &showlist); add_alias_cmd ("pr", "print", no_class, 1, &showlist); - add_prefix_cmd ("raw", no_class, set_print_raw, - _("\ + cmd = add_prefix_cmd ("raw", no_class, set_print_raw, + _("\ Generic command for setting what things to print in \"raw\" mode."), - &setprintrawlist, "set print raw ", 0, &setprintlist); - add_prefix_cmd ("raw", no_class, show_print_raw, - _("Generic command for showing \"print raw\" settings."), - &showprintrawlist, "show print raw ", 0, &showprintlist); + &setprintrawlist, "set print raw ", 0, + &setprintlist); + deprecate_cmd (cmd, nullptr); + + cmd = add_prefix_cmd ("raw", no_class, show_print_raw, + _("Generic command for showing \"print raw\" settings."), + &showprintrawlist, "show print raw ", 0, + &showprintlist); + deprecate_cmd (cmd, nullptr); gdb::option::add_setshow_cmds_for_options (class_support, &user_print_options, value_print_option_defs, |