From ce3acbe9fa876647649cc88f94264a5c56bf46a1 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 13 Mar 2020 17:39:52 -0600 Subject: [PATCH] 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 * valprint.c (value_print): Use scoped_value_mark. --- gdb/ChangeLog | 4 ++++ gdb/valprint.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d83ce81f9d4..13f186e03b4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2020-03-13 Tom Tromey + + * valprint.c (value_print): Use scoped_value_mark. + 2020-03-13 Tom de Vries PR symtab/25646 diff --git a/gdb/valprint.c b/gdb/valprint.c index 8adbb3df457..4383915de73 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; -- 2.30.2