diff options
author | Tom Tromey <tom@tromey.com> | 2023-01-31 09:56:33 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-02-13 15:21:07 -0700 |
commit | fac7bdaaab474e2741b88d24781facd9521d0e9c (patch) | |
tree | 0916d296348e4b31d3f716ce82023b9bd0ca6955 /gdb/value.h | |
parent | 5011c493fb54235b47fbd76e9734072995d93da8 (diff) | |
download | binutils-fac7bdaaab474e2741b88d24781facd9521d0e9c.zip binutils-fac7bdaaab474e2741b88d24781facd9521d0e9c.tar.gz binutils-fac7bdaaab474e2741b88d24781facd9521d0e9c.tar.bz2 |
Turn value_parent into method
This changes value_parent to be a method of value. Much of this patch
was written by script.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/value.h')
-rw-r--r-- | gdb/value.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/gdb/value.h b/gdb/value.h index 7249cdc..9857c43 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -189,6 +189,15 @@ struct value void set_bitpos (LONGEST bit) { m_bitpos = bit; } + /* Only used for bitfields; the containing value. This allows a + single read from the target when displaying multiple + bitfields. */ + value *parent () const + { return m_parent.get (); } + + void set_parent (struct value *parent) + { m_parent = value_ref_ptr::new_reference (parent); } + /* Type of value; either not an lval, or one of the various different possible kinds of lval. */ @@ -367,13 +376,6 @@ struct value ULONGEST m_limited_length = 0; }; -/* Only used for bitfields; the containing value. This allows a - single read from the target when displaying multiple - bitfields. */ - -struct value *value_parent (const struct value *); -extern void set_value_parent (struct value *value, struct value *parent); - /* Describes offset of a value within lval of a structure in bytes. If lval == lval_memory, this is an offset to the address. If lval == lval_register, this is a further offset from location.address |