[01/55] Use scoped_value_mark in value_print
Commit Message
From: Tom Tromey <tromey@adacore.com>
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
2019-12-08 Tom Tromey <tom@tromey.com>
* valprint.c (value_print): Use scoped_value_mark.
Change-Id: I7aad76b8387b87bd46a920f7865725e677a74934
---
gdb/ChangeLog | 4 ++++
gdb/valprint.c | 2 ++
2 files changed, 6 insertions(+)
@@ -1201,6 +1201,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;