* [rfa] Add new breakpoints for arm-linux Thumb
@ 2005-03-25 21:21 Daniel Jacobowitz
2005-03-29 15:47 ` Richard Earnshaw
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2005-03-25 21:21 UTC (permalink / raw)
To: gdb-patches; +Cc: Richard Earnshaw
Just like for ARM mode, Linux uses different instructions for Thumb
breakpoints than other ARM targets. These properly raise a SIGTRAP
rather than some other signal, which makes GDB much happier.
Committed to csl-arm-20050325-branch. OK for HEAD?
--
Daniel Jacobowitz
CodeSourcery, LLC
2005-03-25 Daniel Jacobowitz <dan@codesourcery.com>
* arm-linux-tdep.c (arm_linux_thumb_be_breakpoint)
(arm_linux_thumb_le_breakpoint): New. Update comments.
(arm_linux_init_abi): Set Thumb breakpoints also.
Index: gdb/gdb/arm-linux-tdep.c
===================================================================
--- gdb.orig/gdb/arm-linux-tdep.c 2005-03-24 11:47:34.557904020 -0500
+++ gdb/gdb/arm-linux-tdep.c 2005-03-24 11:54:16.014184011 -0500
@@ -39,13 +39,16 @@
is to execute a particular software interrupt, rather than use a
particular undefined instruction to provoke a trap. Upon exection
of the software interrupt the kernel stops the inferior with a
- SIGTRAP, and wakes the debugger. Since ARM GNU/Linux doesn't support
- Thumb at the moment we only override the ARM breakpoints. */
+ SIGTRAP, and wakes the debugger. */
static const char arm_linux_arm_le_breakpoint[] = { 0x01, 0x00, 0x9f, 0xef };
static const char arm_linux_arm_be_breakpoint[] = { 0xef, 0x9f, 0x00, 0x01 };
+static const char arm_linux_thumb_be_breakpoint[] = {0xde, 0x01};
+
+static const char arm_linux_thumb_le_breakpoint[] = {0x01, 0xde};
+
/* Description of the longjmp buffer. */
#define ARM_LINUX_JB_ELEMENT_SIZE INT_REGISTER_SIZE
#define ARM_LINUX_JB_PC 21
@@ -466,10 +469,17 @@ arm_linux_init_abi (struct gdbarch_info
tdep->lowest_pc = 0x8000;
if (info.byte_order == BFD_ENDIAN_BIG)
- tdep->arm_breakpoint = arm_linux_arm_be_breakpoint;
+ {
+ 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;
+ {
+ 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);
+ tdep->thumb_breakpoint_size = sizeof (arm_linux_thumb_le_breakpoint);
tdep->fp_model = ARM_FLOAT_FPA;
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [rfa] Add new breakpoints for arm-linux Thumb
2005-03-25 21:21 [rfa] Add new breakpoints for arm-linux Thumb Daniel Jacobowitz
@ 2005-03-29 15:47 ` Richard Earnshaw
2005-03-29 16:57 ` Daniel Jacobowitz
0 siblings, 1 reply; 3+ messages in thread
From: Richard Earnshaw @ 2005-03-29 15:47 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches
On Fri, 2005-03-25 at 21:21, Daniel Jacobowitz wrote:
> Just like for ARM mode, Linux uses different instructions for Thumb
> breakpoints than other ARM targets. These properly raise a SIGTRAP
> rather than some other signal, which makes GDB much happier.
>
> Committed to csl-arm-20050325-branch. OK for HEAD?
Yes.
R.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [rfa] Add new breakpoints for arm-linux Thumb
2005-03-29 15:47 ` Richard Earnshaw
@ 2005-03-29 16:57 ` Daniel Jacobowitz
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Jacobowitz @ 2005-03-29 16:57 UTC (permalink / raw)
To: gdb-patches
On Tue, Mar 29, 2005 at 04:46:49PM +0100, Richard Earnshaw wrote:
> On Fri, 2005-03-25 at 21:21, Daniel Jacobowitz wrote:
> > Just like for ARM mode, Linux uses different instructions for Thumb
> > breakpoints than other ARM targets. These properly raise a SIGTRAP
> > rather than some other signal, which makes GDB much happier.
> >
> > Committed to csl-arm-20050325-branch. OK for HEAD?
>
> Yes.
Thanks, committed.
--
Daniel Jacobowitz
CodeSourcery, LLC
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-03-29 16:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-25 21:21 [rfa] Add new breakpoints for arm-linux Thumb Daniel Jacobowitz
2005-03-29 15:47 ` Richard Earnshaw
2005-03-29 16:57 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox