This is the mail archive of the
mailing list for the GDB project.
Re: Get backtrace at PLT and stepi into PLT
- From: Daniel Jacobowitz <drow at false dot org>
- To: User Thinker <thinker at branda dot to>
- Cc: gdb-patches at sourceware dot org, mokoko-group at googlegroups dot com
- Date: Thu, 16 Jul 2009 07:37:30 -0400
- Subject: Re: Get backtrace at PLT and stepi into PLT
- References: <email@example.com>
On Thu, Jul 16, 2009 at 06:18:22PM +0800, User Thinker wrote:
> Hi all,
> I have a patch that makes GDB can properly stepi into PLT for ARM Thumb
> instruction. The patch also allow GDB to perform backtrace at PLT.
What version of GDB are these patches against? Have you tried the
version from CVS? This should work perfectly.
> It means GDB should put a invalid instruction of Thumb version at
> base address of the trampoline. But, it actually puts
> ARM version one. I have checked GDB source code for this issue.
> GDB check flags in symbol that contain memory space that breakpoint
> was setted at. If the symbol is flaged as Thumb, it uses
> Thumb version invalid instruction code, or it would use
> ARM version. It is reasonable. But, the trampoline in PLT contains
> both types of instructions. And, the result of checking is
> the block where the trampoline is in is not Thumb.
The CVS version of GDB checks ABI-defined mapping symbols ($a, $t).
These also allow disassembly to work correctly.
> If you try to backtrace stack when GDB stop at PLT, you would
> get nothing. It is because no any unwinder can handle code in PLT.
arm_stub_unwinder_sniffer is supposed to handle this case. It's been
there since 2005, and I've used it successfully. What's going wrong
> begin 644 arm-plt.diff.gz
Please include patches as text. See the list archives for examples.