diff options
author | Markus Deuling <deuling@de.ibm.com> | 2008-01-18 17:07:40 +0000 |
---|---|---|
committer | Markus Deuling <deuling@de.ibm.com> | 2008-01-18 17:07:40 +0000 |
commit | 32c9a7957208ebe4d7a833cecbf552f3f852e733 (patch) | |
tree | e9504294b71969645a7458f45621802f01b00d6d /gdb/ada-lang.c | |
parent | 1e5e79d0ce60af39979b37292669ec6dae3a9975 (diff) | |
download | gdb-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/ada-lang.c')
-rw-r--r-- | gdb/ada-lang.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 49da2ec..7880645 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -1875,7 +1875,8 @@ decode_packed_array (struct value *arr) return NULL; } - if (BITS_BIG_ENDIAN && ada_is_modular_type (value_type (arr))) + if (gdbarch_bits_big_endian (current_gdbarch) + && ada_is_modular_type (value_type (arr))) { /* This is a (right-justified) modular type representing a packed array with no wrapper. In order to interpret the value through @@ -1998,7 +1999,7 @@ ada_value_primitive_packed_val (struct value *obj, const gdb_byte *valaddr, int len = (bit_size + bit_offset + HOST_CHAR_BIT - 1) / 8; /* Transmit bytes from least to most significant; delta is the direction the indices move. */ - int delta = BITS_BIG_ENDIAN ? -1 : 1; + int delta = gdbarch_bits_big_endian (current_gdbarch) ? -1 : 1; type = ada_check_typedef (type); @@ -2047,7 +2048,7 @@ ada_value_primitive_packed_val (struct value *obj, const gdb_byte *valaddr, memset (unpacked, 0, TYPE_LENGTH (type)); return v; } - else if (BITS_BIG_ENDIAN) + else if (gdbarch_bits_big_endian (current_gdbarch)) { src = len - 1; if (has_negatives (type) @@ -2141,7 +2142,7 @@ move_bits (gdb_byte *target, int targ_offset, const gdb_byte *source, targ_offset %= HOST_CHAR_BIT; source += src_offset / HOST_CHAR_BIT; src_offset %= HOST_CHAR_BIT; - if (BITS_BIG_ENDIAN) + if (gdbarch_bits_big_endian (current_gdbarch)) { accum = (unsigned char) *source; source += 1; @@ -2229,7 +2230,7 @@ ada_value_assign (struct value *toval, struct value *fromval) fromval = value_cast (type, fromval); read_memory (to_addr, buffer, len); - if (BITS_BIG_ENDIAN) + if (gdbarch_bits_big_endian (current_gdbarch)) move_bits (buffer, value_bitpos (toval), value_contents (fromval), TYPE_LENGTH (value_type (fromval)) * TARGET_CHAR_BIT - @@ -2276,7 +2277,7 @@ value_assign_to_component (struct value *container, struct value *component, else bits = value_bitsize (component); - if (BITS_BIG_ENDIAN) + if (gdbarch_bits_big_endian (current_gdbarch)) move_bits (value_contents_writeable (container) + offset_in_container, value_bitpos (container) + bit_offset_in_container, value_contents (val), |