From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30823 invoked by alias); 21 Jul 2009 08:08:06 -0000 Received: (qmail 30809 invoked by uid 22791); 21 Jul 2009 08:08:05 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=BAYES_00,J_CHICKENPOX_21,SARE_RECV_SPAM_NAME1,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-pz0-f203.google.com (HELO mail-pz0-f203.google.com) (209.85.222.203) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 21 Jul 2009 08:07:57 +0000 Received: by pzk41 with SMTP id 41so2186020pzk.12 for ; Tue, 21 Jul 2009 01:07:55 -0700 (PDT) Received: by 10.114.134.15 with SMTP id h15mr7506841wad.42.1248163675644; Tue, 21 Jul 2009 01:07:55 -0700 (PDT) Received: from bibi.branda.to (59-124-94-250.HINET-IP.hinet.net [59.124.94.250]) by mx.google.com with ESMTPS id k21sm11688125waf.59.2009.07.21.01.07.52 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 21 Jul 2009 01:07:54 -0700 (PDT) Received: from bibi.branda.to (localhost [127.0.0.1]) by bibi.branda.to (8.14.3/8.14.3) with ESMTP id n6L2vV1Z002567; Tue, 21 Jul 2009 10:59:34 +0800 (CST) (envelope-from thinker@localhost.my.domain) Received: (from thinker@localhost) by bibi.branda.to (8.14.3/8.14.3/Submit) id n6L2v6xf002521; Tue, 21 Jul 2009 10:57:06 +0800 (CST) (envelope-from thinker) From: Thinker Li MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19045.11906.492610.388479@bibi.branda.to> Date: Tue, 21 Jul 2009 15:12:00 -0000 To: Daniel Jacobowitz Cc: Thinker Li , gdb-patches@sourceware.org Subject: Re: Get backtrace at PLT and stepi into PLT In-Reply-To: <20090720120722.GA28313@caradoc.them.org> References: <20090720120722.GA28313@caradoc.them.org> 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/msg00507.txt.bz2 Daniel Jacobowitz writes: > On Mon, Jul 20, 2009 at 03:36:18PM +0800, Thinker Li wrote: > > And, as what you had said, there are a lot of ABI-defined mapping symbols > > ($a, $t) in symbol tables of shared objects. But, they are generated > > only for .text but .plt section. So, it got nothing to try to issue > > a backtrace command when the inferior is stopped at .plt section. > > > > Is GNU ld supposed to generate ABI-defined mapping symbols for > > .plt? Or, does GDB need to do more work on this issue? > > Mapping symbols are used for other things, like setting breakpoints, > but not for backtrace. What's the actual problem with backtracing? > You can not do backtrace when you stop at PLT with GDB. arm_stub_unwind_sniffer create a frame with NORMAL_FRAME type for PLT. But, when we do backtrace, get_prev_frame() will check if this frame inside_entry_func. Since we can not found any symbol for PLT, it:s func address is 0, and entry_point_address() is also 0 if symfile_objfile is NULL (no main symbol table). It makes problem on backtracing. > Current versions of GNU ld do generate correct mapping symbols for the > PLT. Some earlier versions didn't, though.