aboutsummaryrefslogtreecommitdiff
path: root/gdb/stack.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2020-03-13 17:39:52 -0600
committerTom Tromey <tom@tromey.com>2020-03-13 18:03:39 -0600
commitc2a44efee1cbe5321a850c53f34e9c205a1d6ca0 (patch)
tree6e7d1d21d56bf84789e3caa4ff8bc46b1e0b2896 /gdb/stack.c
parentb0c26e99f50d6926dd628ec51c1e9a037c521ab5 (diff)
downloadgdb-c2a44efee1cbe5321a850c53f34e9c205a1d6ca0.zip
gdb-c2a44efee1cbe5321a850c53f34e9c205a1d6ca0.tar.gz
gdb-c2a44efee1cbe5321a850c53f34e9c205a1d6ca0.tar.bz2
Introduce common_val_print_checked
A (much) later patch will remove the call to value_check_printable from common_val_print. This will needed to preserve some details of how optimized-out structures are printed. However, doing this will also break dw2-op-out-param.exp. Making the change causes "bt" to print: However, the test wants to see: ... operand2=<optimized out> That is, a wholly-optimized out structure should not print its fields. So, this patch introduces a new common_val_print_checked, which calls value_check_printable first, and then arranges to use it in the one spot that affects the test suite. I was not completely sure if it would be preferable to change the test. However, I reasoned that, assuming this output was intentional in the first place, in a backtrace space is at a premium and so this is a reasonable approach. In other spots calling common_val_print, this behavior is probably unintended, or at least a "don't care". gdb/ChangeLog 2020-03-13 Tom Tromey <tom@tromey.com> * valprint.h (common_val_print_checked): Declare. * valprint.c (common_val_print_checked): New function. * stack.c (print_frame_arg): Use common_val_print_checked.
Diffstat (limited to 'gdb/stack.c')
-rw-r--r--gdb/stack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/stack.c b/gdb/stack.c
index 024ead0..af35d79 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -486,7 +486,7 @@ print_frame_arg (const frame_print_options &fp_opts,
vp_opts.summary
= fp_opts.print_frame_arguments == print_frame_arguments_scalars;
- common_val_print (arg->val, &stb, 2, &vp_opts, language);
+ common_val_print_checked (arg->val, &stb, 2, &vp_opts, language);
}
catch (const gdb_exception_error &except)
{