aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-lang.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2005-02-08 04:57:03 +0000
committerAndrew Cagney <cagney@redhat.com>2005-02-08 04:57:03 +0000
commit9bbda5038131704610b27bee2c70e81c68374f61 (patch)
tree29a7f21f9bb6823656559ada652a519530f57498 /gdb/ada-lang.c
parent0a40490e6aa43a28c471f4db8a18a4820cbf58c3 (diff)
downloadgdb-9bbda5038131704610b27bee2c70e81c68374f61.zip
gdb-9bbda5038131704610b27bee2c70e81c68374f61.tar.gz
gdb-9bbda5038131704610b27bee2c70e81c68374f61.tar.bz2
2005-02-07 Andrew Cagney <cagney@gnu.org>
* value.c (set_value_bitpos, set_value_bitsize): Define. * value.h (set_value_bitpos, set_value_bitsize): Declare. * ada-lang.c, valarith.c: Update.
Diffstat (limited to 'gdb/ada-lang.c')
-rw-r--r--gdb/ada-lang.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index b3bed52..b2fb2a6 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -448,8 +448,8 @@ coerce_unspec_val_to_type (struct value *val, struct type *type)
result = allocate_value (type);
VALUE_LVAL (result) = VALUE_LVAL (val);
- result->bitsize = value_bitsize (val);
- result->bitpos = value_bitpos (val);
+ set_value_bitsize (result, value_bitsize (val));
+ set_value_bitpos (result, value_bitpos (val));
VALUE_ADDRESS (result) = VALUE_ADDRESS (val) + value_offset (val);
if (value_lazy (val)
|| TYPE_LENGTH (type) > TYPE_LENGTH (value_type (val)))
@@ -1830,16 +1830,16 @@ ada_value_primitive_packed_val (struct value *obj, const bfd_byte *valaddr,
if (VALUE_LVAL (obj) == lval_internalvar)
VALUE_LVAL (v) = lval_internalvar_component;
VALUE_ADDRESS (v) = VALUE_ADDRESS (obj) + value_offset (obj) + offset;
- v->bitpos = bit_offset + value_bitpos (obj);
- v->bitsize = bit_size;
+ set_value_bitpos (v, bit_offset + value_bitpos (obj));
+ set_value_bitsize (v, bit_size);
if (value_bitpos (v) >= HOST_CHAR_BIT)
{
VALUE_ADDRESS (v) += 1;
- v->bitpos -= HOST_CHAR_BIT;
+ set_value_bitpos (v, value_bitpos (v) - HOST_CHAR_BIT);
}
}
else
- v->bitsize = bit_size;
+ set_value_bitsize (v, bit_size);
unpacked = (unsigned char *) value_contents (v);
srcBitsLeft = bit_size;