From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12044 invoked by alias); 13 Jun 2011 19:15:39 -0000 Received: (qmail 12036 invoked by uid 22791); 13 Jun 2011 19:15:39 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 13 Jun 2011 19:15:22 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id p5DJFH0U019625; Mon, 13 Jun 2011 21:15:17 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id p5DJFESL000868; Mon, 13 Jun 2011 21:15:14 +0200 (CEST) Date: Mon, 13 Jun 2011 19:15:00 -0000 Message-Id: <201106131915.p5DJFESL000868@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: tromey@redhat.com CC: jan.kratochvil@redhat.com, gdb-patches@sourceware.org In-reply-to: (message from Tom Tromey on Mon, 13 Jun 2011 10:43:20 -0600) Subject: Re: [RFC] i386 PLT stub unwinder References: <201106131555.p5DFtucc019690@glazunov.sibelius.xs4all.nl> <20110613161402.GB18588@host1.jankratochvil.net> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-06/txt/msg00179.txt.bz2 > From: Tom Tromey > Date: Mon, 13 Jun 2011 10:43:20 -0600 > > >>>>> "Jan" == Jan Kratochvil 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.