aboutsummaryrefslogtreecommitdiff
path: root/gdb/value.h
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2023-12-20 21:40:46 +0000
committerSimon Marchi <simon.marchi@polymtl.ca>2023-12-24 10:38:06 -0500
commit8b31004bd82d3833d042dc5d456e1279635734ab (patch)
tree823716d2383fac78b955dc1b290698db150c001a /gdb/value.h
parent306f960b492b35798e01acef5e177838bffc362d (diff)
downloadfsf-binutils-gdb-8b31004bd82d3833d042dc5d456e1279635734ab.zip
fsf-binutils-gdb-8b31004bd82d3833d042dc5d456e1279635734ab.tar.gz
fsf-binutils-gdb-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/value.h')
-rw-r--r--gdb/value.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/gdb/value.h b/gdb/value.h
index c56504b..0e8c759 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -373,7 +373,15 @@ public:
struct internalvar **deprecated_internalvar_hack ()
{ return &m_location.internalvar; }
- struct frame_id *deprecated_next_frame_id_hack ();
+ /* Return this value's next frame id.
+
+ The value must be of lval == lval_register. */
+ frame_id next_frame_id ()
+ {
+ gdb_assert (m_lval == lval_register);
+
+ return m_location.reg.next_frame_id;
+ }
int *deprecated_regnum_hack ();
@@ -964,12 +972,6 @@ extern void error_value_optimized_out (void);
/* Pointer to internal variable. */
#define VALUE_INTERNALVAR(val) (*((val)->deprecated_internalvar_hack ()))
-/* Frame ID of "next" frame to which a register value is relative. A
- register value is indicated by VALUE_LVAL being set to lval_register.
- So, if the register value is found relative to frame F, then the
- frame id of F->next will be stored in VALUE_NEXT_FRAME_ID. */
-#define VALUE_NEXT_FRAME_ID(val) (*((val)->deprecated_next_frame_id_hack ()))
-
/* Register number if the value is from a register. */
#define VALUE_REGNUM(val) (*((val)->deprecated_regnum_hack ()))