aboutsummaryrefslogtreecommitdiff
path: root/gdb/stack.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2013-07-17 20:35:11 +0000
committerDoug Evans <dje@google.com>2013-07-17 20:35:11 +0000
commite7045703528f2fb0d4cadf2ddab16d1887046f35 (patch)
tree627d5ca62a8379cc2eb29a718094adb3334ccd9f /gdb/stack.c
parent453e48a5a576472ddf5b099a1c0a0e00ff1da657 (diff)
downloadgdb-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/stack.c')
-rw-r--r--gdb/stack.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/stack.c b/gdb/stack.c
index 313d57f..d89ff89 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -65,6 +65,9 @@ static const char *const print_frame_arguments_choices[] =
{"all", "scalars", "none", NULL};
static const char *print_frame_arguments = "scalars";
+/* If non-zero, don't invoke pretty-printers for frame arguments. */
+static int print_raw_frame_arguments;
+
/* The possible choices of "set print entry-values", and the value
of this setting. */
@@ -277,6 +280,7 @@ print_frame_arg (const struct frame_arg *arg)
get_no_prettyformat_print_options (&opts);
opts.deref_ref = 1;
+ opts.raw = print_raw_frame_arguments;
/* True in "summary" mode, false otherwise. */
opts.summary = !strcmp (print_frame_arguments, "scalars");
@@ -2640,6 +2644,15 @@ Usage: func <name>\n"));
_("Show printing of non-scalar frame arguments"),
NULL, NULL, NULL, &setprintlist, &showprintlist);
+ add_setshow_boolean_cmd ("frame-arguments", no_class,
+ &print_raw_frame_arguments, _("\
+Set whether to print frame arguments in raw form."), _("\
+Show whether to print frame arguments in raw form."), _("\
+If set, frame arguments are printed in raw form, bypassing any\n\
+pretty-printers for that value."),
+ NULL, NULL,
+ &setprintrawlist, &showprintrawlist);
+
add_setshow_auto_boolean_cmd ("disassemble-next-line", class_stack,
&disassemble_next_line, _("\
Set whether to disassemble next source line or insn when execution stops."),