From: matthew green <mrg@eterna.com.au>
To: gdb-patches@sources.redhat.com
Subject: [PATCH] armeb-netbsdelf support
Date: Sun, 09 Nov 2003 17:31:00 -0000 [thread overview]
Message-ID: <25138.1068364594@splode.eterna.com.au> (raw)
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;
next reply other threads:[~2003-11-09 17:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-09 17:31 matthew green [this message]
2003-11-09 17:52 ` Richard Earnshaw
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=25138.1068364594@splode.eterna.com.au \
--to=mrg@eterna.com.au \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox