aboutsummaryrefslogtreecommitdiff
path: root/gdb/value.c
diff options
context:
space:
mode:
authorMarkus Deuling <deuling@de.ibm.com>2008-01-18 17:07:40 +0000
committerMarkus Deuling <deuling@de.ibm.com>2008-01-18 17:07:40 +0000
commit32c9a7957208ebe4d7a833cecbf552f3f852e733 (patch)
treee9504294b71969645a7458f45621802f01b00d6d /gdb/value.c
parent1e5e79d0ce60af39979b37292669ec6dae3a9975 (diff)
downloadgdb-32c9a7957208ebe4d7a833cecbf552f3f852e733.zip
gdb-32c9a7957208ebe4d7a833cecbf552f3f852e733.tar.gz
gdb-32c9a7957208ebe4d7a833cecbf552f3f852e733.tar.bz2
* gdbarch.sh (function_list): Add new property bits_big_endian to
gdbarch structure. * gdbarch.{c,h}: Regenerate. * value.c (struct value): Replace BITS_BIG_ENDIAN by gdbarch_bits_big_endian (comment). (unpack_field_as_long, modify_field): Likewise. * value.h: Likewise (comment). * valops.c (value_slice): Likewise. * valarith.c (value_subscript, value_bit_index): Likewise. * gdbtypes.h (field): Likewise (comment). * eval.c (evaluate_subexp_standard): Likewise. * dwarf2read.c (dwarf2_add_field): Likewise. * ada-lang.c (decode_packed_array, ada_value_primitive_packed_val) (move_bits, ada_value_assign, value_assign_to_component): Likewise. * defs.h (BITS_BIG_ENDIAN): Remove. * gdbint.texinfo (Target Conditionals): Replace the description of BITS_BIG_ENDIAN with a description of gdbarch_bits_big_endian.
Diffstat (limited to 'gdb/value.c')
-rw-r--r--gdb/value.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/value.c b/gdb/value.c
index 1a5f984..e620550 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -72,8 +72,8 @@ struct value
int bitsize;
/* Only used for bitfields; position of start of field. For
- BITS_BIG_ENDIAN=0 targets, it is the position of the LSB. For
- BITS_BIG_ENDIAN=1 targets, it is the position of the MSB. */
+ gdbarch_bits_big_endian=0 targets, it is the position of the LSB. For
+ gdbarch_bits_big_endian=1 targets, it is the position of the MSB. */
int bitpos;
/* Frame register value is relative to. This will be described in
@@ -1481,7 +1481,7 @@ unpack_field_as_long (struct type *type, const gdb_byte *valaddr, int fieldno)
/* Extract bits. See comment above. */
- if (BITS_BIG_ENDIAN)
+ if (gdbarch_bits_big_endian (current_gdbarch))
lsbcount = (sizeof val * 8 - bitpos % 8 - bitsize);
else
lsbcount = (bitpos % 8);
@@ -1537,7 +1537,7 @@ modify_field (gdb_byte *addr, LONGEST fieldval, int bitpos, int bitsize)
oword = extract_unsigned_integer (addr, sizeof oword);
/* Shifting for bit field depends on endianness of the target machine. */
- if (BITS_BIG_ENDIAN)
+ if (gdbarch_bits_big_endian (current_gdbarch))
bitpos = sizeof (oword) * 8 - bitpos - bitsize;
oword &= ~(mask << bitpos);