set the arm breakpoint depending on the byte order. now armeb gdb works.

This commit is contained in:
mrg 2003-11-09 02:52:07 +00:00
parent 9df7e01734
commit 0bcb648614
1 changed files with 11 additions and 2 deletions

View File

@ -31,6 +31,7 @@
/* 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 int
arm_netbsd_aout_in_solib_call_trampoline (CORE_ADDR pc, char *name)
@ -48,8 +49,16 @@ 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);
if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
{
tdep->arm_breakpoint = arm_nbsd_arm_be_breakpoint;
tdep->arm_breakpoint_size = sizeof (arm_nbsd_arm_be_breakpoint);
}
else
{
tdep->arm_breakpoint = arm_nbsd_arm_le_breakpoint;
tdep->arm_breakpoint_size = sizeof (arm_nbsd_arm_le_breakpoint);
}
tdep->jb_pc = JB_PC;
tdep->jb_elt_size = JB_ELEMENT_SIZE;