aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2003-09-07 01:36:00 +0000
committerDaniel Jacobowitz <drow@false.org>2003-09-07 01:36:00 +0000
commit2ef47cd0ea616e02ae0fd36ca7204e004635869a (patch)
treeae354aa4333a9e33ce4501c5a614fd80ad4dbeaa
parent9a5f96921585fd46e97b676defc4eb254acaf418 (diff)
downloadgdb-2ef47cd0ea616e02ae0fd36ca7204e004635869a.zip
gdb-2ef47cd0ea616e02ae0fd36ca7204e004635869a.tar.gz
gdb-2ef47cd0ea616e02ae0fd36ca7204e004635869a.tar.bz2
* arm-linux-tdep.c (arm_linux_arm_be_breakpoint): New.
(arm_linux_init_abi): Use arm_linux_arm_be_breakpoint.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/arm-linux-tdep.c14
2 files changed, 14 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 25eb61d..418a2a5 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2003-09-06 Daniel Jacobowitz <drow@mvista.com>
+
+ * arm-linux-tdep.c (arm_linux_arm_be_breakpoint): New.
+ (arm_linux_init_abi): Use arm_linux_arm_be_breakpoint.
+
2003-09-06 Mark Kettenis <kettenis@gnu.org>
* sol-thread.c: Include "gdb_string.h".
diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c
index 5ea3ef2..f3ec1f9 100644
--- a/gdb/arm-linux-tdep.c
+++ b/gdb/arm-linux-tdep.c
@@ -41,11 +41,12 @@
is to execute a particular software interrupt, rather than use a
particular undefined instruction to provoke a trap. Upon exection
of the software interrupt the kernel stops the inferior with a
- SIGTRAP, and wakes the debugger. Since ARM GNU/Linux is little
- endian, and doesn't support Thumb at the moment we only override
- the ARM little-endian breakpoint. */
+ SIGTRAP, and wakes the debugger. Since ARM GNU/Linux doesn't support
+ Thumb at the moment we only override the ARM breakpoints. */
-static const char arm_linux_arm_le_breakpoint[] = {0x01,0x00,0x9f,0xef};
+static const char arm_linux_arm_le_breakpoint[] = { 0x01, 0x00, 0x9f, 0xef };
+
+static const char arm_linux_arm_be_breakpoint[] = { 0xef, 0x9f, 0x00, 0x01 };
/* DEPRECATED_CALL_DUMMY_WORDS:
This sequence of words is the instructions
@@ -566,7 +567,10 @@ arm_linux_init_abi (struct gdbarch_info info,
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
tdep->lowest_pc = 0x8000;
- tdep->arm_breakpoint = arm_linux_arm_le_breakpoint;
+ if (info.byte_order == BFD_ENDIAN_BIG)
+ tdep->arm_breakpoint = arm_linux_arm_be_breakpoint;
+ else
+ tdep->arm_breakpoint = arm_linux_arm_le_breakpoint;
tdep->arm_breakpoint_size = sizeof (arm_linux_arm_le_breakpoint);
tdep->fp_model = ARM_FLOAT_FPA;