From e7045703528f2fb0d4cadf2ddab16d1887046f35 Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Wed, 17 Jul 2013 20:35:11 +0000 Subject: * 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. --- gdb/stack.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'gdb/stack.c') 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 \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."), -- cgit v1.1