aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-valprint.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2022-10-03 13:51:58 -0600
committerTom Tromey <tromey@adacore.com>2022-10-14 11:21:02 -0600
commit65558ca5df91470521fda6b0bfdfbbdbd37ce4d3 (patch)
tree3136e77c0b2c58fe3d0ece1e4bfa4215498605a8 /gdb/ada-valprint.c
parentce6c3d253b97961801bc045d10b7fd022578fd03 (diff)
downloadgdb-65558ca5df91470521fda6b0bfdfbbdbd37ce4d3.zip
gdb-65558ca5df91470521fda6b0bfdfbbdbd37ce4d3.tar.gz
gdb-65558ca5df91470521fda6b0bfdfbbdbd37ce4d3.tar.bz2
Use scoped_value_mark in more places
I looked at all the spots using value_mark, and converted all the straightforward ones to use scoped_value_mark instead. Regression tested on x86-64 Fedora 34.
Diffstat (limited to 'gdb/ada-valprint.c')
-rw-r--r--gdb/ada-valprint.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c
index 59f0be4..40c2614 100644
--- a/gdb/ada-valprint.c
+++ b/gdb/ada-valprint.c
@@ -127,9 +127,10 @@ val_print_packed_array_elements (struct type *type, const gdb_byte *valaddr,
unsigned len;
struct type *elttype, *index_type;
unsigned long bitsize = TYPE_FIELD_BITSIZE (type, 0);
- struct value *mark = value_mark ();
LONGEST low = 0;
+ scoped_value_mark mark;
+
elttype = type->target_type ();
index_type = type->index_type ();
@@ -251,8 +252,6 @@ val_print_packed_array_elements (struct type *type, const gdb_byte *valaddr,
{
gdb_printf (stream, "...");
}
-
- value_free_to_mark (mark);
}
/* Print the character C on STREAM as part of the contents of a literal