diff options
author | Doug Evans <dje@google.com> | 2013-07-17 20:35:11 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2013-07-17 20:35:11 +0000 |
commit | e7045703528f2fb0d4cadf2ddab16d1887046f35 (patch) | |
tree | 627d5ca62a8379cc2eb29a718094adb3334ccd9f /gdb/valprint.c | |
parent | 453e48a5a576472ddf5b099a1c0a0e00ff1da657 (diff) | |
download | gdb-e7045703528f2fb0d4cadf2ddab16d1887046f35.zip gdb-e7045703528f2fb0d4cadf2ddab16d1887046f35.tar.gz gdb-e7045703528f2fb0d4cadf2ddab16d1887046f35.tar.bz2 |
* NEWS: Mention "set print raw frame-arguments".
* gdbcmd.h (setprintrawlist, showprintrawlist): Declare.
* stack.c (print_raw_frame_arguments): New static global.
(print_frame_arg): Set opts.raw from print_raw_frame_arguments.
(_initialize_stack): New command "set/show print raw frame-arguments".
* valprint.c (setprintrawlist, showprintrawlist): New globals.
(set_print_raw, show_print_raw): New functions.
(_initialize_valprint): New prefix command "set/show print raw".
* valprint.h (value_print_options): Improve comments.
doc/
* gdb.texinfo (Print Settings): Document "print raw frame-arguments".
testsuite/
* gdb.python/py-frame-args.c: New file.
* gdb.python/py-frame-args.py: New file.
* gdb.python/py-frame-args.exp New file.
Diffstat (limited to 'gdb/valprint.c')
-rw-r--r-- | gdb/valprint.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gdb/valprint.c b/gdb/valprint.c index 184bab6..753ae34 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -76,6 +76,9 @@ struct converted_character typedef struct converted_character converted_character_d; DEF_VEC_O (converted_character_d); +/* Command lists for set/show print raw. */ +struct cmd_list_element *setprintrawlist; +struct cmd_list_element *showprintrawlist; /* Prototypes for local functions */ @@ -2686,6 +2689,21 @@ show_print (char *args, int from_tty) { cmd_show_list (showprintlist, from_tty, ""); } + +static void +set_print_raw (char *arg, int from_tty) +{ + printf_unfiltered ( + "\"set print raw\" must be followed by the name of a \"print raw\" subcommand.\n"); + help_list (setprintrawlist, "set print raw ", -1, gdb_stdout); +} + +static void +show_print_raw (char *args, int from_tty) +{ + cmd_show_list (showprintrawlist, from_tty, ""); +} + void _initialize_valprint (void) @@ -2703,6 +2721,14 @@ _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, + _("\ +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); + add_setshow_uinteger_cmd ("elements", no_class, &user_print_options.print_max, _("\ Set limit on string chars or array elements to print."), _("\ |