This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] i386 PLT stub unwinder


> From: Tom Tromey <tromey@redhat.com>
> Date: Mon, 13 Jun 2011 10:43:20 -0600
> 
> >>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
> 
> Jan> On Mon, 13 Jun 2011 17:55:56 +0200, Mark Kettenis wrote:
> >> Jan's mail about DWARF CFI for PLT stubs prompted me to write an
> >> undinder for the PLT stubs as defined by the i386 ABI.  With this
> >> change I can step through the PLT stubs and always have a proper
> >> backtrace.
> 
> Jan> I do not think GDB is the right place to fix it, it should be fixed
> Jan> by proper .eh_Frame as this problem affects all the tools trying to
> Jan> unwind such as also oprofile, systemtap etc.

Sure, fixing this in ld is better.  But that will only work if people
use a full GNU toolchain.

> I agree, but I think also doing it in GDB is harmless, at least provided
> that the new unwinder is only applied when the PLT stubs are missing the
> needed info.  That way, when ld is fixed, GDB will automatically start
> doing the right thing.

Yes.  The DWARF CFI unwinder comes before the PLT stub unwinder in the
list, so if there is CFI for the PLT stubs, it will be used instead.
So there is no harm in adding this functionality to GDB.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]