summaryrefslogtreecommitdiff
path: root/gdb/arm-linux-tdep.c
diff options
context:
space:
mode:
authorRichard Earnshaw <richard.earnshaw@arm.com>2002-02-15 16:12:24 +0000
committerRichard Earnshaw <richard.earnshaw@arm.com>2002-02-15 16:12:24 +0000
commit5737defbd5b212b7fb40f2341595d29de84aa460 (patch)
tree64ad71010aa18dddd2559fb06253307628e957af /gdb/arm-linux-tdep.c
parent221ebec0192984b40a99c4d3842bfa502d272866 (diff)
downloadgdb-5737defbd5b212b7fb40f2341595d29de84aa460.tar.gz
* arm-tdep.h (struct gdbarch_tdep): Add fields for breakpoint
descriptions. * arm-tdep.c (arm_default_arm_le_breakpoint) (arm_default_arm_be_breakpoint, arm_default_thumb_le_breakpoint) (arm_default_thumb_be_breakpoint): New. Initialize them from traditional breakpoint defines. (arm_breakpoint_from_pc): Use new gdbarch_tdep entries. (arm_gdbarch_init): Initialize new breakpoint variables. * arm-linux-tdep.c (arm_linux_arm_le_breakpoint): New. (arm_linux_init_abi): Initialize linux-specific breakpoint. * armnbsd-tdep.c (arm_nbsd_arm_le_breakpoint): New. (arm_netbsd_aout_init_abi, arm_netbsd_elf_init_abi): Split common code out to ... (arm_netbsd_init_abi_common): ... here; new function. * config/arm/tm-arm.h (ARM_LE_BREAKPOINT, ARM_BE_BREAKPOINT) (THUMB_LE_BREAKPOINT, THUMB_BE_BREAKPOINT): Delete. * config/arm/tm-linux.h (ARM_LE_BREAKPOINT): Delete. * config/arm/tm-nbsd.h (ARM_LE_BREAKPOINT): Delete.
Diffstat (limited to 'gdb/arm-linux-tdep.c')
-rw-r--r--gdb/arm-linux-tdep.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c
index ac2f8e0542b..6049cf53a8e 100644
--- a/gdb/arm-linux-tdep.c
+++ b/gdb/arm-linux-tdep.c
@@ -35,6 +35,15 @@
#include "symfile.h"
#include "objfiles.h"
+/* Under ARM Linux the traditional way of performing a breakpoint 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 Linux is little endian, and doesn't support Thumb
+ at the moment we only override the ARM little-endian breakpoint. */
+
+static const char arm_linux_arm_le_breakpoint[] = {0x01,0x00,0x9f,0xef};
+
/* CALL_DUMMY_WORDS:
This sequence of words is the instructions
@@ -537,6 +546,8 @@ 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;
+ tdep->arm_breakpoint_size = sizeof (arm_linux_arm_le_breakpoint);
}
void