From: Mark Wielaard <mjw@redhat.com>
To: elfutils-devel@lists.fedorahosted.org
Subject: Re: Libdw sample for reading function names and addresses
Date: Sun, 09 Nov 2014 18:04:13 +0100 [thread overview]
Message-ID: <1415552653.19702.40.camel@bordewijk.wildebeest.org> (raw)
In-Reply-To: CAPO7Hz-V+1YSZHPySYgxHrdHHmDCENxtOG2RnbjUoUvEqt3J2A@mail.gmail.com
[-- Attachment #1: Type: text/plain, Size: 976 bytes --]
On Sat, 2014-11-08 at 22:00 -0500, buddhika chamith wrote:
> Not entirely sure if this is the correct forum. But any help is greatly
> appreciated. I have a requirement to read off function names and addresses
> from an ELF binary debug symbols. Is there any such piece of code that's
> already there that you have written? I had a look at some elfutils codes
> (e.g: nm.c) in the hope of adapting them to my requirement. But the libdw
> API is seems bit intimidating to me given that I have little knowledge on
> Dwarf format.
There is no such thing as "debug symbols". There are various DIEs (Debug
Information Entries) that can be associated with particular address
ranges though. You might want to read a bit about DWARF at
http://dwarfstd.org/
You might want to take a look at src/addr2line.c which has some code
(print_dwarf_function) to print out some information found in the DWARF
debuginfo associated with a particular address.
Cheers,
Mark
next reply other threads:[~2014-11-09 17:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-09 17:04 Mark Wielaard [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-11-11 4:41 buddhika chamith
2014-11-10 1:57 Petr Machata
2014-11-09 3:00 buddhika chamith
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=1415552653.19702.40.camel@bordewijk.wildebeest.org \
--to=mjw@redhat.com \
--cc=elfutils-devel@lists.fedorahosted.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).