[PATCH] armeb-netbsdelf support
matthew green
mrg@eterna.com.au
Sun Nov 9 17:31:00 GMT 2003
hi folks.
this minor changes adds armeb-netbsdelf support to GDB. thanks
to richard earnshaw for pointing me the right way. this works with
a relatively simple test case, but i'm having trouble getting results
with the gdb testsuite due to hardware lossage. this patch also
works fine in GDB 5.3.
(BTW, i have an unrelated change to my breakpoint.c that gets gdb
to actually link, due to missing symbols hidden by SOADD_LIB not
being defined. i have this problem with the working-in-5.3
little endian arm-netbsdelf target as well. it seems unrelated to
the armeb-netbsdelf support.)
thanks.
.mrg.
2003-11-09 matthew green <mrg@eterna.com.au>
* armnbsd-tdep.c (arm_nbsd_arm_be_breakpoint): New char array.
(arm_netbsd_init_abi_common): Use arm_nbsd_arm_be_breakpoint if
this target is big endian.
Index: armnbsd-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/armnbsd-tdep.c,v
retrieving revision 1.10
diff -p -r1.10 armnbsd-tdep.c
*** gdb/armnbsd-tdep.c 24 Mar 2003 09:53:41 -0000 1.10
--- gdb/armnbsd-tdep.c 9 Nov 2003 07:35:05 -0000
***************
*** 32,37 ****
--- 32,38 ----
/* 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)
*************** arm_netbsd_init_abi_common (struct gdbar
*** 49,56 ****
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);
tdep->jb_pc = ARM_NBSD_JB_PC;
tdep->jb_elt_size = ARM_NBSD_JB_ELEMENT_SIZE;
--- 50,65 ----
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
tdep->lowest_pc = 0x8000;
! 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 = ARM_NBSD_JB_PC;
tdep->jb_elt_size = ARM_NBSD_JB_ELEMENT_SIZE;
More information about the Gdb-patches
mailing list