diff options
author | Tom Tromey <tromey@adacore.com> | 2019-11-25 12:31:02 -0700 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2019-12-04 09:31:18 -0700 |
commit | d5a22e77b56529eade787419ea80a7e9e7d2aa6f (patch) | |
tree | 9efbd056575604aae8ac03e072aac8e2439ea3cd /gdb/ada-lang.c | |
parent | 7ab4a236ce85f1e0950e88e267e679a066b77bed (diff) | |
download | gdb-d5a22e77b56529eade787419ea80a7e9e7d2aa6f.zip gdb-d5a22e77b56529eade787419ea80a7e9e7d2aa6f.tar.gz gdb-d5a22e77b56529eade787419ea80a7e9e7d2aa6f.tar.bz2 |
Remove gdbarch_bits_big_endian
From what I can tell, set_gdbarch_bits_big_endian has never been used.
That is, all architectures since its introduction have simply used the
default, which is simply check the architecture's byte-endianness.
Because this interferes with the scalar_storage_order code, this patch
removes this gdbarch setting entirely. In some places,
type_byte_order is used rather than the plain gdbarch.
gdb/ChangeLog
2019-12-04 Tom Tromey <tromey@adacore.com>
* ada-lang.c (decode_constrained_packed_array)
(ada_value_assign, value_assign_to_component): Update.
* dwarf2loc.c (rw_pieced_value, access_memory)
(dwarf2_compile_expr_to_ax): Update.
* dwarf2read.c (dwarf2_add_field): Update.
* eval.c (evaluate_subexp_standard): Update.
* gdbarch.c, gdbarch.h: Rebuild.
* gdbarch.sh (bits_big_endian): Remove.
* gdbtypes.h (union field_location): Update comment.
* target-descriptions.c (make_gdb_type): Update.
* valarith.c (value_bit_index): Update.
* value.c (struct value) <bitpos>: Update comment.
(unpack_bits_as_long, modify_field): Update.
* value.h (value_bitpos): Update comment.
Change-Id: I379b5e0c408ec8742f7a6c6b721108e73ed1b018
Diffstat (limited to 'gdb/ada-lang.c')
-rw-r--r-- | gdb/ada-lang.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 7959a5f..3289a8e 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -2257,7 +2257,7 @@ decode_constrained_packed_array (struct value *arr) return NULL; } - if (gdbarch_bits_big_endian (get_type_arch (value_type (arr))) + if (type_byte_order (value_type (arr)) == BFD_ENDIAN_BIG && ada_is_modular_type (value_type (arr))) { /* This is a (right-justified) modular type representing a packed @@ -2499,7 +2499,7 @@ ada_value_primitive_packed_val (struct value *obj, const gdb_byte *valaddr, const gdb_byte *src; /* First byte containing data to unpack */ gdb_byte *unpacked; const int is_scalar = is_scalar_type (type); - const int is_big_endian = gdbarch_bits_big_endian (get_type_arch (type)); + const int is_big_endian = type_byte_order (type) == BFD_ENDIAN_BIG; gdb::byte_vector staging; type = ada_check_typedef (type); @@ -2645,7 +2645,7 @@ ada_value_assign (struct value *toval, struct value *fromval) if (from_size == 0) from_size = TYPE_LENGTH (value_type (fromval)) * TARGET_CHAR_BIT; - const int is_big_endian = gdbarch_bits_big_endian (get_type_arch (type)); + const int is_big_endian = type_byte_order (type) == BFD_ENDIAN_BIG; ULONGEST from_offset = 0; if (is_big_endian && is_scalar_type (value_type (fromval))) from_offset = from_size - bits; @@ -2694,7 +2694,7 @@ value_assign_to_component (struct value *container, struct value *component, else bits = value_bitsize (component); - if (gdbarch_bits_big_endian (get_type_arch (value_type (container)))) + if (type_byte_order (value_type (container)) == BFD_ENDIAN_BIG) { int src_offset; |