From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17530 invoked by alias); 16 Jul 2009 11:37:45 -0000 Received: (qmail 17522 invoked by uid 22791); 16 Jul 2009 11:37:45 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 16 Jul 2009 11:37:34 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 6D50F109FF; Thu, 16 Jul 2009 11:37:32 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id 1F7F4108A5; Thu, 16 Jul 2009 11:37:31 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1MRPHG-0002Lk-Ow; Thu, 16 Jul 2009 07:37:30 -0400 Date: Thu, 16 Jul 2009 19:11:00 -0000 From: Daniel Jacobowitz To: User Thinker Cc: gdb-patches@sourceware.org, mokoko-group@googlegroups.com Subject: Re: Get backtrace at PLT and stepi into PLT Message-ID: <20090716113730.GA8646@caradoc.them.org> Mail-Followup-To: User Thinker , gdb-patches@sourceware.org, mokoko-group@googlegroups.com References: <19038.65134.58926.218902@bibi.branda.to> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <19038.65134.58926.218902@bibi.branda.to> User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes 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: 2009-07/txt/msg00408.txt.bz2 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 with that? > begin 644 arm-plt.diff.gz > M'XL(`#OJ7DH``YU7;4_;2!#^C'_%E)-Z`3O43D*20JDH$"A5"%62ZGKWQ?++ Please include patches as text. See the list archives for examples. Thanks. -- Daniel Jacobowitz CodeSourcery