aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Earnshaw <richard.earnshaw@arm.com>2004-08-23 10:28:58 +0000
committerRichard Earnshaw <richard.earnshaw@arm.com>2004-08-23 10:28:58 +0000
commit2afeb6b8547ca12afa3fc084af1f2abb93bccd09 (patch)
treefff65026a7eafa9dfef39813aa56f2fbc26dfed4
parentd2a7154afd566358fe680aee0149c059e84fea0a (diff)
downloadgdb-2afeb6b8547ca12afa3fc084af1f2abb93bccd09.zip
gdb-2afeb6b8547ca12afa3fc084af1f2abb93bccd09.tar.gz
gdb-2afeb6b8547ca12afa3fc084af1f2abb93bccd09.tar.bz2
* armnbsd-tdep.c (arm_nbsd_arm_be_breakpoint): Define.
(arm_nbsd_thumb_[lb]e_breakpoint): Define. (arm_netbsd_init_abi_common): Register them.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/armnbsd-tdep.c25
2 files changed, 29 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2b30f27..25cac87 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2004-08-23 Richard Earnshaw <rearnsha@arm.com>
+
+ * armnbsd-tdep.c (arm_nbsd_arm_be_breakpoint): Define.
+ (arm_nbsd_thumb_[lb]e_breakpoint): Define.
+ (arm_netbsd_init_abi_common): Register them.
+
2004-08-22 Mark Kettenis <kettenis@gnu.org>
* config/vax/vax.mh (NATDEPFILES): Add vax-nat.c.
diff --git a/gdb/armnbsd-tdep.c b/gdb/armnbsd-tdep.c
index 38edf9f..0d7c0b5 100644
--- a/gdb/armnbsd-tdep.c
+++ b/gdb/armnbsd-tdep.c
@@ -35,6 +35,9 @@
/* For compatibility with previous implemenations of GDB on arm/NetBSD,
override the default little-endian breakpoint. */
static const char arm_nbsd_arm_le_breakpoint[] = {0x11, 0x00, 0x00, 0xe6};
+static const char arm_nbsd_arm_be_breakpoint[] = {0xe6, 0x00, 0x00, 0x11};
+static const char arm_nbsd_thumb_le_breakpoint[] = {0xfe, 0xde};
+static const char arm_nbsd_thumb_be_breakpoint[] = {0xde, 0xfe};
static int
arm_netbsd_aout_in_solib_call_trampoline (CORE_ADDR pc, char *name)
@@ -52,8 +55,26 @@ arm_netbsd_init_abi_common (struct gdbarch_info info,
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
tdep->lowest_pc = 0x8000;
- tdep->arm_breakpoint = arm_nbsd_arm_le_breakpoint;
- tdep->arm_breakpoint_size = sizeof (arm_nbsd_arm_le_breakpoint);
+ switch (info.byte_order)
+ {
+ case BFD_ENDIAN_LITTLE:
+ tdep->arm_breakpoint = arm_nbsd_arm_le_breakpoint;
+ tdep->thumb_breakpoint = arm_nbsd_thumb_le_breakpoint;
+ tdep->arm_breakpoint_size = sizeof (arm_nbsd_arm_le_breakpoint);
+ tdep->thumb_breakpoint_size = sizeof (arm_nbsd_thumb_le_breakpoint);
+ break;
+
+ case BFD_ENDIAN_BIG:
+ tdep->arm_breakpoint = arm_nbsd_arm_be_breakpoint;
+ tdep->thumb_breakpoint = arm_nbsd_thumb_be_breakpoint;
+ tdep->arm_breakpoint_size = sizeof (arm_nbsd_arm_be_breakpoint);
+ tdep->thumb_breakpoint_size = sizeof (arm_nbsd_thumb_be_breakpoint);
+ break;
+
+ default:
+ internal_error (__FILE__, __LINE__,
+ "arm_gdbarch_init: bad byte order for float format");
+ }
tdep->jb_pc = ARM_NBSD_JB_PC;
tdep->jb_elt_size = ARM_NBSD_JB_ELEMENT_SIZE;