* arm-linux-tdep.c (eabi_linux_arm_le_breakpoint)
authorDaniel Jacobowitz <drow@false.org>
Sun, 13 Nov 2005 18:04:14 +0000 (18:04 +0000)
committerDaniel Jacobowitz <drow@false.org>
Sun, 13 Nov 2005 18:04:14 +0000 (18:04 +0000)
(eabi_linux_arm_be_breakpoint): New variables.
(arm_linux_init_abi): Use them.

gdb/ChangeLog
gdb/arm-linux-tdep.c

index b78569fc95fd83a8463c535fa839be7f843d11d7..85e9fb1ac41eed739a610cdc1a79f025ff87ed05 100644 (file)
@@ -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  Michael Snyder  <msnyder@redhat.com>
 
        * inftarg.c (child_wait): Delete unused local variable.
index e6ce06f56e95d2eebe4355e377127083ef1d7eb4..98786f63764b45110b695f1d64e0bc73e0617f1b 100644 (file)
@@ -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);
This page took 0.029168 seconds and 4 git commands to generate.