aboutsummaryrefslogtreecommitdiff
path: root/gdb/valprint.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2020-03-13 17:39:52 -0600
committerTom Tromey <tom@tromey.com>2020-03-13 18:03:39 -0600
commitce3acbe9fa876647649cc88f94264a5c56bf46a1 (patch)
tree348ca498278326c6c0525681088a883fc9a1d9a6 /gdb/valprint.c
parent1b83d09cd503d7fde57c50db51d5780ee8df5fae (diff)
downloadbinutils-ce3acbe9fa876647649cc88f94264a5c56bf46a1.zip
binutils-ce3acbe9fa876647649cc88f94264a5c56bf46a1.tar.gz
binutils-ce3acbe9fa876647649cc88f94264a5c56bf46a1.tar.bz2
Use scoped_value_mark in value_print
Switching the low-level printing to use the value API means we will be using more temporary values. This adds a scoped_value_mark to value_print, so that these intermediates are destroyed in a timely way. gdb/ChangeLog 2020-03-13 Tom Tromey <tom@tromey.com> * valprint.c (value_print): Use scoped_value_mark.
Diffstat (limited to 'gdb/valprint.c')
-rw-r--r--gdb/valprint.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/valprint.c b/gdb/valprint.c
index 8adbb3d..4383915 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -1227,6 +1227,8 @@ void
value_print (struct value *val, struct ui_file *stream,
const struct value_print_options *options)
{
+ scoped_value_mark free_values;
+
if (!value_check_printable (val, stream, options))
return;