aboutsummaryrefslogtreecommitdiff
path: root/gdb/regcache.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/regcache.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/regcache.c')
-rw-r--r--gdb/regcache.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gdb/regcache.c b/gdb/regcache.c
index 279bf22..1156590 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -708,10 +708,10 @@ readable_regcache::cooked_read (int regnum, gdb_byte *buf)
}
else if (gdbarch_pseudo_register_read_value_p (m_descr->gdbarch))
{
- struct value *mark, *computed;
+ struct value *computed;
enum register_status result = REG_VALID;
- mark = value_mark ();
+ scoped_value_mark mark;
computed = gdbarch_pseudo_register_read_value (m_descr->gdbarch,
this, regnum);
@@ -724,8 +724,6 @@ readable_regcache::cooked_read (int regnum, gdb_byte *buf)
result = REG_UNAVAILABLE;
}
- value_free_to_mark (mark);
-
return result;
}
else