summaryrefslogtreecommitdiff
path: root/gdb/stack.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2013-07-17 20:35:10 +0000
committerDoug Evans <dje@google.com>2013-07-17 20:35:10 +0000
commitd679e74e9e265fac6e12944db461b1445688d9aa (patch)
treef4096ee1511c3b095d47fa38a88d39acd35959ed /gdb/stack.c
parent60d57d2ccf4cb4142a25487ee7ee054633b6df3b (diff)
downloadgdb-d679e74e9e265fac6e12944db461b1445688d9aa.tar.gz
* 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 313d57f1ee1..d89ff89bdd6 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."),