diff options
author | Philippe Waroquiers <philippe.waroquiers@skynet.be> | 2019-08-07 20:50:54 +0200 |
---|---|---|
committer | Philippe Waroquiers <philippe.waroquiers@skynet.be> | 2019-12-11 04:31:05 +0100 |
commit | d8edc8b768f0f611088161161392e1075134d635 (patch) | |
tree | 37f073313f2bf23e8dcbddbd19c815e7b3a0fba6 /gdb/valprint.c | |
parent | 5afa80e9a8e6585eeaac44ca51be9c6b2471bf80 (diff) | |
download | gdb-d8edc8b768f0f611088161161392e1075134d635.zip gdb-d8edc8b768f0f611088161161392e1075134d635.tar.gz gdb-d8edc8b768f0f611088161161392e1075134d635.tar.bz2 |
Implement 'print -raw-values' and 'set print raw-values on|off'
The option framework documentation was speaking about a 'print -raw'
option, but this option does not exist.
This patch implements -raw-values option that tells to ignore the
active pretty printers when printing a value.
As we already have -raw-frame-arguments, I thought -raw-values
was more clear, in particular to differentiate
set print raw-values and set print raw-frame-arguments.
gdb/doc/ChangeLog
2019-12-11 Philippe Waroquiers <philippe.waroquiers@skynet.be>
* gdb.texinfo (Command Options): Use -p and -pretty in the example,
as -r is ambiguous. Update the print - TAB TAB completion result.
(Data): Document new option -raw-values. Use -p and -pretty in the
example, as -r is ambiguous.
(Print Settings): Document set print raw values.
(Pretty-Printer Commands): Document interaction between enabled
pretty printers and -raw-values/-raw-frame-arguments.
gdb/ChangeLog
2019-12-11 Philippe Waroquiers <philippe.waroquiers@skynet.be>
* NEWS: Document -raw-values option and the related setting commands.
* printcmd.c (print_command_parse_format): Do not set opts->raw off,
only set it on when /r is given.
* valprint.c (value_print_option_defs): New element raw-values.
* Makefile.in: Add the new file.
gdb/testsuite/ChangeLog
2019-12-11 Philippe Waroquiers <philippe.waroquiers@skynet.be>
* gdb.base/options.exp: Add -raw-values in the print completion list.
* gdb.python/py-prettyprint.exp: Add tests for -raw-values.
Diffstat (limited to 'gdb/valprint.c')
-rw-r--r-- | gdb/valprint.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/valprint.c b/gdb/valprint.c index 1e3071b..4f80ee0 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -3198,6 +3198,16 @@ Use \"unlimited\" to print the complete structure.") NULL, /* help_doc */ }, + boolean_option_def { + "raw-values", + [] (value_print_options *opt) { return &opt->raw; }, + NULL, /* show_cmd_cb */ + N_("Set whether to print values in raw form."), + N_("Show whether to print values in raw form."), + N_("If set, values are printed in raw form, bypassing any\n\ +pretty-printers for that value.") + }, + uinteger_option_def { "repeats", [] (value_print_options *opt) { return &opt->repeat_count_threshold; }, |