diff options
author | Daniel Jacobowitz <dan@debian.org> | 2005-11-13 18:06:27 +0000 |
---|---|---|
committer | Daniel Jacobowitz <dan@debian.org> | 2005-11-13 18:06:27 +0000 |
commit | 6c0918ac379efa2003cfabf1656bb902253b6fb5 (patch) | |
tree | 5e1032a76202fe62a1157c13c3d33794c475a528 | |
parent | 14dbb44c12b9b0b6ee2a0e16c3ddb3dcb5fefa63 (diff) | |
download | gdb-6c0918ac379efa2003cfabf1656bb902253b6fb5.tar.gz |
* arm-linux-tdep.c (eabi_linux_arm_le_breakpoint)
(eabi_linux_arm_be_breakpoint): New variables.
(arm_linux_init_abi): Use them.
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/arm-linux-tdep.c | 23 |
2 files changed, 27 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fa8449fb63b..17502429809 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2005-11-13 Daniel Jacobowitz <dan@codesourcery.com> + + * arm-linux-tdep.c (eabi_linux_arm_le_breakpoint) + (eabi_linux_arm_be_breakpoint): New variables. + (arm_linux_init_abi): Use them. + 2005-11-11 Stephane Carrez <stcarrez@nerim.fr> PR tui/1995 diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c index e6ce06f56e9..98786f63764 100644 --- a/gdb/arm-linux-tdep.c +++ b/gdb/arm-linux-tdep.c @@ -45,6 +45,19 @@ static const char arm_linux_arm_le_breakpoint[] = { 0x01, 0x00, 0x9f, 0xef }; static const char arm_linux_arm_be_breakpoint[] = { 0xef, 0x9f, 0x00, 0x01 }; +/* However, the EABI syscall interface (new in Nov. 2005) does not look at + the operand of the swi if old-ABI compatibility is disabled. Therefore, + use an undefined instruction instead. This is supported as of kernel + version 2.5.70 (May 2003), so should be a safe assumption for EABI + binaries. */ + +static const char eabi_linux_arm_le_breakpoint[] = { 0xf0, 0x01, 0xf0, 0xe7 }; + +static const char eabi_linux_arm_be_breakpoint[] = { 0xe7, 0xf0, 0x01, 0xf0 }; + +/* All the kernels which support Thumb support using a specific undefined + instruction for the Thumb breakpoint. */ + static const char arm_linux_thumb_be_breakpoint[] = {0xde, 0x01}; static const char arm_linux_thumb_le_breakpoint[] = {0x01, 0xde}; @@ -329,12 +342,18 @@ arm_linux_init_abi (struct gdbarch_info info, tdep->lowest_pc = 0x8000; if (info.byte_order == BFD_ENDIAN_BIG) { - tdep->arm_breakpoint = arm_linux_arm_be_breakpoint; + if (tdep->arm_abi == ARM_ABI_AAPCS) + tdep->arm_breakpoint = eabi_linux_arm_be_breakpoint; + else + tdep->arm_breakpoint = arm_linux_arm_be_breakpoint; tdep->thumb_breakpoint = arm_linux_thumb_be_breakpoint; } else { - tdep->arm_breakpoint = arm_linux_arm_le_breakpoint; + if (tdep->arm_abi == ARM_ABI_AAPCS) + tdep->arm_breakpoint = eabi_linux_arm_le_breakpoint; + else + tdep->arm_breakpoint = arm_linux_arm_le_breakpoint; tdep->thumb_breakpoint = arm_linux_thumb_le_breakpoint; } tdep->arm_breakpoint_size = sizeof (arm_linux_arm_le_breakpoint); |