diff options
author | Stan Shebs <shebs@apple.com> | 2008-08-11 19:00:23 +0000 |
---|---|---|
committer | Stan Shebs <shebs@apple.com> | 2008-08-11 19:00:23 +0000 |
commit | c56c9a9917c73e4d8fe8fcbf5e6c830853dd9119 (patch) | |
tree | 50931841ed232fca2e9650fbb5e41e6a1a3d89c0 /gdb/arch-utils.c | |
parent | bc86379d277c48b460f3ebc0d8f1a000ed619fbc (diff) | |
download | gdb-c56c9a9917c73e4d8fe8fcbf5e6c830853dd9119.tar.gz |
ARM BE8 support.
* disasm.c (gdb_disassemble_info): Set endian_code.
* gdbarch.sh (gdbarch_info): New field byte_order_for_code.
* gdbarch.h, gdbarch.c: Regenerate.
* arch-utils.c (initialize_current_architecture): Set the
default byte_order_for_code.
(gdbarch_info_init): Ditto.
(gdbarch_info_fill): Ditto.
* arm-tdep.c (SWAP_INT, SWAP_SHORT): New macros.
(thumb_analyze_prologue): Swap halfword if code endianness is
different from general endianness.
(arm_skip_prologue): Similarly.
(arm_scan_prologue): Ditto.
(thumb_get_next_pc): Ditto.
(arm_get_next_pc): Ditto.
(arm_gdbarch_init): Set byte_order_for_code from BE8 flag,
choose correct endianness for breakpoints.
Diffstat (limited to 'gdb/arch-utils.c')
-rw-r--r-- | gdb/arch-utils.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index 259d1e3a5f4..a2fd7b65661 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -629,6 +629,7 @@ initialize_current_architecture (void) } info.byte_order = default_byte_order; + info.byte_order_for_code = info.byte_order; if (! gdbarch_update_p (info)) internal_error (__FILE__, __LINE__, @@ -667,6 +668,7 @@ gdbarch_info_init (struct gdbarch_info *info) { memset (info, 0, sizeof (struct gdbarch_info)); info->byte_order = BFD_ENDIAN_UNKNOWN; + info->byte_order_for_code = info->byte_order; info->osabi = GDB_OSABI_UNINITIALIZED; } @@ -708,6 +710,7 @@ gdbarch_info_fill (struct gdbarch_info *info) /* From the default. */ if (info->byte_order == BFD_ENDIAN_UNKNOWN) info->byte_order = default_byte_order; + info->byte_order_for_code = info->byte_order; /* "(gdb) set osabi ...". Handled by gdbarch_lookup_osabi. */ if (info->osabi == GDB_OSABI_UNINITIALIZED) |