From: Bruce Korb <bruce.korb@gmail.com>
To: Bruce Korb <bruce.korb@gmail.com>,
Paul Pluzhnikov <ppluzhnikov@google.com>,
gdb@sourceware.org, gdb@gnu.org
Subject: Re: How does one get static procedure names?
Date: Tue, 27 Oct 2009 19:37:00 -0000 [thread overview]
Message-ID: <668c430c0910271233m35b959bepb91df230b6c05ced@mail.gmail.com> (raw)
In-Reply-To: <20091027192701.GA14984@caradoc.them.org>
On Tue, Oct 27, 2009 at 12:27 PM, Daniel Jacobowitz <drow@false.org> wrote:
> 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.
Exactly. I know it'd be some work. I think I need to
call: dlopen(NULL, RTLD_NOW)
and then copy & fiddle code out of GDB. yes? :)
Or, do I have to figure out the actual file name and replace
NULL with that file name? Either way....now what?
Just point me to some code & I ought to be okay.
next prev parent reply other threads:[~2009-10-27 19:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-27 18:36 Bruce Korb
2009-10-27 18:56 ` Paul Pluzhnikov
2009-10-27 19:11 ` Bruce Korb
2009-10-27 19:31 ` Daniel Jacobowitz
2009-10-27 19:37 ` Bruce Korb [this message]
2009-10-27 19:43 ` Daniel Jacobowitz
2009-10-27 20:03 ` Bruce Korb
2009-10-27 20:10 ` Andreas Schwab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=668c430c0910271233m35b959bepb91df230b6c05ced@mail.gmail.com \
--to=bruce.korb@gmail.com \
--cc=gdb@gnu.org \
--cc=gdb@sourceware.org \
--cc=ppluzhnikov@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox