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/valops.c | |
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/valops.c')
-rw-r--r-- | gdb/valops.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/valops.c b/gdb/valops.c index 4535691..e522f84 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -1125,14 +1125,14 @@ value_assign (struct value *toval, struct value *fromval) /* Are we dealing with a bitfield? - It is important to mention that `value_parent (toval)' is + It is important to mention that `toval->parent ()' is non-NULL iff `toval->bitsize ()' is non-zero. */ if (toval->bitsize ()) { /* VALUE_INTERNALVAR below refers to the parent value, while the offset is relative to this parent value. */ - gdb_assert (value_parent (value_parent (toval)) == NULL); - offset += value_offset (value_parent (toval)); + gdb_assert (toval->parent ()->parent () == NULL); + offset += value_offset (toval->parent ()); } set_internalvar_component (VALUE_INTERNALVAR (toval), @@ -1152,7 +1152,7 @@ value_assign (struct value *toval, struct value *fromval) if (toval->bitsize ()) { - struct value *parent = value_parent (toval); + struct value *parent = toval->parent (); changed_addr = value_address (parent) + value_offset (toval); changed_len = (toval->bitpos () @@ -1215,7 +1215,7 @@ value_assign (struct value *toval, struct value *fromval) if (toval->bitsize ()) { - struct value *parent = value_parent (toval); + struct value *parent = toval->parent (); LONGEST offset = value_offset (parent) + value_offset (toval); size_t changed_len; gdb_byte buffer[sizeof (LONGEST)]; |