diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2023-12-20 21:40:46 +0000 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2023-12-24 10:38:06 -0500 |
commit | 8b31004bd82d3833d042dc5d456e1279635734ab (patch) | |
tree | 823716d2383fac78b955dc1b290698db150c001a /gdb/valops.c | |
parent | 306f960b492b35798e01acef5e177838bffc362d (diff) | |
download | binutils-8b31004bd82d3833d042dc5d456e1279635734ab.zip binutils-8b31004bd82d3833d042dc5d456e1279635734ab.tar.gz binutils-8b31004bd82d3833d042dc5d456e1279635734ab.tar.bz2 |
gdb: remove VALUE_NEXT_FRAME_ID, add value::next_frame_id
Remove VALUE_NEXT_FRAME_ID, replace it with a method on struct value. Set
`m_location.reg.next_frame_id` directly from value::allocate_register_lazy,
which is fine because allocate_register_lazy is a static creation
function for struct value.
Change-Id: Ic9f0f239c166a88dccfee836f9f51871e67548e6
Diffstat (limited to 'gdb/valops.c')
-rw-r--r-- | gdb/valops.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gdb/valops.c b/gdb/valops.c index 049314c..5a5b3f1 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -1193,7 +1193,7 @@ value_assign (struct value *toval, struct value *fromval) case lval_register: { - frame_info_ptr next_frame = frame_find_by_id (VALUE_NEXT_FRAME_ID (toval)); + frame_info_ptr next_frame = frame_find_by_id (toval->next_frame_id ()); int value_reg = VALUE_REGNUM (toval); @@ -1410,11 +1410,10 @@ address_of_variable (struct symbol *var, const struct block *b) { case lval_register: { - frame_info_ptr frame; const char *regname; - frame = frame_find_by_id (VALUE_NEXT_FRAME_ID (val)); - gdb_assert (frame); + frame_info_ptr frame = frame_find_by_id (val->next_frame_id ()); + gdb_assert (frame != nullptr); regname = gdbarch_register_name (get_frame_arch (frame), VALUE_REGNUM (val)); |