* [PATCH] armeb-netbsdelf support
@ 2003-11-09 17:31 matthew green
2003-11-09 17:52 ` Richard Earnshaw
0 siblings, 1 reply; 2+ messages in thread
From: matthew green @ 2003-11-09 17:31 UTC (permalink / raw)
To: gdb-patches
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;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] armeb-netbsdelf support
2003-11-09 17:31 [PATCH] armeb-netbsdelf support matthew green
@ 2003-11-09 17:52 ` Richard Earnshaw
0 siblings, 0 replies; 2+ messages in thread
From: Richard Earnshaw @ 2003-11-09 17:52 UTC (permalink / raw)
To: matthew green; +Cc: gdb-patches, Richard.Earnshaw
>
> 2003-11-09 matthew green <mrg@eterna.com.au>
Convention is to use capitals in the contributors name.
>
> * 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.
>
OK.
R.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-11-09 17:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-09 17:31 [PATCH] armeb-netbsdelf support matthew green
2003-11-09 17:52 ` Richard Earnshaw
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox