* Fixing stack backtraces on 26-bit ARM
@ 2006-10-19 19:47 Ben Harris
2006-10-26 15:43 ` Richard Earnshaw
0 siblings, 1 reply; 2+ messages in thread
From: Ben Harris @ 2006-10-19 19:47 UTC (permalink / raw)
To: gdb-patches
At present, stack backtraces don't work on 26-bit ARM systems because R15
pulled out of stack frames doesn't get its PSR bits stripped out, so PC
ends up appearing to point somewhere insane. This is a simple patch (from
NetBSD CVS) to apply ADDR_BITS_REMOVE to values pulled from stack frames
to generate PC. This patch may have been approved once before, in 2001,
but it was never applied.
2006-10-19 Ben Harris <bjh21@NetBSD.org>
* arm-tdep.c (arm_unwind_pc): Use ADDR_BITS_REMOVE.
--- gdb/arm-tdep.c 2 Jul 2006 21:04:40 -0000 1.3
+++ gdb/arm-tdep.c 14 Oct 2006 10:42:53 -0000 1.4
@@ -1056,7 +1056,7 @@ arm_unwind_pc (struct gdbarch *gdbarch,
{
CORE_ADDR pc;
pc = frame_unwind_register_unsigned (this_frame, ARM_PC_REGNUM);
- return IS_THUMB_ADDR (pc) ? UNMAKE_THUMB_ADDR (pc) : pc;
+ return ADDR_BITS_REMOVE (pc);
}
static CORE_ADDR
--
Ben Harris <bjh21@NetBSD.org>
Portmaster, NetBSD/acorn26 <http://www.NetBSD.org/Ports/acorn26/>
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: Fixing stack backtraces on 26-bit ARM
2006-10-19 19:47 Fixing stack backtraces on 26-bit ARM Ben Harris
@ 2006-10-26 15:43 ` Richard Earnshaw
0 siblings, 0 replies; 2+ messages in thread
From: Richard Earnshaw @ 2006-10-26 15:43 UTC (permalink / raw)
To: Ben Harris; +Cc: gdb-patches
On Thu, 2006-10-19 at 20:46 +0100, Ben Harris wrote:
> At present, stack backtraces don't work on 26-bit ARM systems because R15
> pulled out of stack frames doesn't get its PSR bits stripped out, so PC
> ends up appearing to point somewhere insane. This is a simple patch (from
> NetBSD CVS) to apply ADDR_BITS_REMOVE to values pulled from stack frames
> to generate PC. This patch may have been approved once before, in 2001,
> but it was never applied.
>
> 2006-10-19 Ben Harris <bjh21@NetBSD.org>
>
> * arm-tdep.c (arm_unwind_pc): Use ADDR_BITS_REMOVE.
>
> --- gdb/arm-tdep.c 2 Jul 2006 21:04:40 -0000 1.3
> +++ gdb/arm-tdep.c 14 Oct 2006 10:42:53 -0000 1.4
> @@ -1056,7 +1056,7 @@ arm_unwind_pc (struct gdbarch *gdbarch,
> {
> CORE_ADDR pc;
> pc = frame_unwind_register_unsigned (this_frame, ARM_PC_REGNUM);
> - return IS_THUMB_ADDR (pc) ? UNMAKE_THUMB_ADDR (pc) : pc;
> + return ADDR_BITS_REMOVE (pc);
> }
>
> static CORE_ADDR
I think it would be better to just call arm_addr_bits_remove() directly
(more efficient within the back-end); but otherwise this is OK.
R.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-10-26 15:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-19 19:47 Fixing stack backtraces on 26-bit ARM Ben Harris
2006-10-26 15:43 ` Richard Earnshaw
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox