aboutsummaryrefslogtreecommitdiff
path: root/gdb/valarith.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/valarith.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/valarith.c')
-rw-r--r--gdb/valarith.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/valarith.c b/gdb/valarith.c
index c0e937d..7a9e130 100644
--- a/gdb/valarith.c
+++ b/gdb/valarith.c
@@ -1615,7 +1615,7 @@ vector_binop (struct value *val1, struct value *val2, enum exp_opcode op)
value *val = allocate_value (type1);
gdb::array_view<gdb_byte> val_contents = value_contents_writeable (val);
- value *mark = value_mark ();
+ scoped_value_mark mark;
for (i = 0; i < high_bound1 - low_bound1 + 1; i++)
{
value *tmp = value_binop (value_subscript (val1, i),
@@ -1623,7 +1623,6 @@ vector_binop (struct value *val1, struct value *val2, enum exp_opcode op)
copy (value_contents_all (tmp),
val_contents.slice (i * elsize, elsize));
}
- value_free_to_mark (mark);
return val;
}