From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26436 invoked by alias); 27 Oct 2009 19:27:12 -0000 Received: (qmail 26427 invoked by uid 22791); 27 Oct 2009 19:27:11 -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; Tue, 27 Oct 2009 19:27:05 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 507C910B94; Tue, 27 Oct 2009 19:27:03 +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 B277E109F9; Tue, 27 Oct 2009 19:27:02 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1N2rh7-0003yJ-G6; Tue, 27 Oct 2009 15:27:01 -0400 Date: Tue, 27 Oct 2009 19:31:00 -0000 From: Daniel Jacobowitz To: Bruce Korb Cc: Paul Pluzhnikov , gdb@sourceware.org, gdb@gnu.org Subject: Re: How does one get static procedure names? Message-ID: <20091027192701.GA14984@caradoc.them.org> Mail-Followup-To: Bruce Korb , Paul Pluzhnikov , gdb@sourceware.org, gdb@gnu.org References: <668c430c0910271132j48e478d6s88aeb51282229402@mail.gmail.com> <8ac60eac0910271140n54923a92u74bd2a909ed05696@mail.gmail.com> <668c430c0910271156m29e5770dyec6de9afa84f01f7@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <668c430c0910271156m29e5770dyec6de9afa84f01f7@mail.gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-10/txt/msg00395.txt.bz2 On Tue, Oct 27, 2009 at 11:56:46AM -0700, Bruce Korb wrote: > Sorry. When you do a "bt" using gdb, you see the function > names, whether they be "static" or have global (external) > linkage. The function backtrace_symbols(), on the other > hand, doe *not* print static scope function names. Even if > it takes some work, I'd like to "fix" the constraint. However, > I wasn't able to decipher the gdb source well enough to figure > out how it accomplished this feat. So, is there some place > in the GDB source where I ought to be looking? You can't readily do so. backtrace_symbols is using the dynamic symbol table, which is loaded into memory. Local symbols are not added to the dynamic symbol table. GDB reads both the local symbol table and the DWARF/stabs debug information. You'd need an additional symbol table reader which read them off disk instead of out of RAM. -- Daniel Jacobowitz CodeSourcery