diff options
author | Tom Tromey <tom@tromey.com> | 2023-01-31 09:44:47 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-02-13 15:21:07 -0700 |
commit | 5011c493fb54235b47fbd76e9734072995d93da8 (patch) | |
tree | 265e8d7258f005a399660d041c80a9536792229e /gdb/valops.c | |
parent | f49d5fa263e834a4cf171f43a450ac5b1ae5ae30 (diff) | |
download | binutils-gdb-5011c493fb54235b47fbd76e9734072995d93da8.tar.gz |
Turn value_bitpos into method
This changes value_bitpos 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 2ad19eaf8c7..45356919185 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -1137,7 +1137,7 @@ value_assign (struct value *toval, struct value *fromval) set_internalvar_component (VALUE_INTERNALVAR (toval), offset, - value_bitpos (toval), + toval->bitpos (), toval->bitsize (), fromval); } @@ -1155,7 +1155,7 @@ value_assign (struct value *toval, struct value *fromval) struct value *parent = value_parent (toval); changed_addr = value_address (parent) + value_offset (toval); - changed_len = (value_bitpos (toval) + changed_len = (toval->bitpos () + toval->bitsize () + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT; @@ -1176,7 +1176,7 @@ value_assign (struct value *toval, struct value *fromval) read_memory (changed_addr, buffer, changed_len); modify_field (type, buffer, value_as_long (fromval), - value_bitpos (toval), toval->bitsize ()); + toval->bitpos (), toval->bitsize ()); dest_buffer = buffer; } else @@ -1221,7 +1221,7 @@ value_assign (struct value *toval, struct value *fromval) gdb_byte buffer[sizeof (LONGEST)]; int optim, unavail; - changed_len = (value_bitpos (toval) + changed_len = (toval->bitpos () + toval->bitsize () + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT; @@ -1244,7 +1244,7 @@ value_assign (struct value *toval, struct value *fromval) } modify_field (type, buffer, value_as_long (fromval), - value_bitpos (toval), toval->bitsize ()); + toval->bitpos (), toval->bitsize ()); put_frame_register_bytes (frame, value_reg, offset, {buffer, changed_len}); |