forked from Imagelibrary/binutils-gdb
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
This commit is contained in:
@@ -172,7 +172,6 @@ struct gdbarch
|
||||
|
||||
*/
|
||||
|
||||
int bits_big_endian;
|
||||
int short_bit;
|
||||
int int_bit;
|
||||
int long_bit;
|
||||
@@ -389,7 +388,6 @@ gdbarch_alloc (const struct gdbarch_info *info,
|
||||
gdbarch->target_desc = info->target_desc;
|
||||
|
||||
/* Force the explicit initialization of these. */
|
||||
gdbarch->bits_big_endian = (gdbarch->byte_order == BFD_ENDIAN_BIG);
|
||||
gdbarch->short_bit = 2*TARGET_CHAR_BIT;
|
||||
gdbarch->int_bit = 4*TARGET_CHAR_BIT;
|
||||
gdbarch->long_bit = 4*TARGET_CHAR_BIT;
|
||||
@@ -528,7 +526,6 @@ verify_gdbarch (struct gdbarch *gdbarch)
|
||||
if (gdbarch->bfd_arch_info == NULL)
|
||||
log.puts ("\n\tbfd_arch_info");
|
||||
/* Check those that need to be defined for the given multi-arch level. */
|
||||
/* Skip verify of bits_big_endian, invalid_p == 0 */
|
||||
/* Skip verify of short_bit, invalid_p == 0 */
|
||||
/* Skip verify of int_bit, invalid_p == 0 */
|
||||
/* Skip verify of long_bit, invalid_p == 0 */
|
||||
@@ -816,9 +813,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
|
||||
fprintf_unfiltered (file,
|
||||
"gdbarch_dump: bfd_arch_info = %s\n",
|
||||
gdbarch_bfd_arch_info (gdbarch)->printable_name);
|
||||
fprintf_unfiltered (file,
|
||||
"gdbarch_dump: bits_big_endian = %s\n",
|
||||
plongest (gdbarch->bits_big_endian));
|
||||
fprintf_unfiltered (file,
|
||||
"gdbarch_dump: breakpoint_from_pc = <%s>\n",
|
||||
host_address_to_string (gdbarch->breakpoint_from_pc));
|
||||
@@ -1564,23 +1558,6 @@ gdbarch_target_desc (struct gdbarch *gdbarch)
|
||||
return gdbarch->target_desc;
|
||||
}
|
||||
|
||||
int
|
||||
gdbarch_bits_big_endian (struct gdbarch *gdbarch)
|
||||
{
|
||||
gdb_assert (gdbarch != NULL);
|
||||
/* Skip verify of bits_big_endian, invalid_p == 0 */
|
||||
if (gdbarch_debug >= 2)
|
||||
fprintf_unfiltered (gdb_stdlog, "gdbarch_bits_big_endian called\n");
|
||||
return gdbarch->bits_big_endian;
|
||||
}
|
||||
|
||||
void
|
||||
set_gdbarch_bits_big_endian (struct gdbarch *gdbarch,
|
||||
int bits_big_endian)
|
||||
{
|
||||
gdbarch->bits_big_endian = bits_big_endian;
|
||||
}
|
||||
|
||||
int
|
||||
gdbarch_short_bit (struct gdbarch *gdbarch)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user