Re: creating a load map to associate addresses with symbols
Re: creating a load map to associate addresses with symbols
- Subject: Re: creating a load map to associate addresses with symbols
- From: Jason Molenda <email@hidden>
- Date: Thu, 25 May 2006 18:17:18 -0700
On May 25, 2006, at 5:42 PM, Brendan Creane wrote:
Another possibility is to parse the new .dSYM files
... but I haven't found an API for accessing the
contents of the .dSYM file.
There isn't one. The .dSYM file is the DWARF debug information for
your executable; you can read the specifics about the DWARF standard
here:
http://dwarf.freestandards.org/Home.php
Xcode 2.3 includes the dwarfdump(1) utility; there is a man page
documenting its usage. You may be able to process its output to do
what you need. Specifically, look at the DW_TAG_subprogram DIEs and
the DW_AT_low_pc and DW_AT_high_pc attributes in them. It won't be
that easy all of the time -- for instance a C++ constructor has a
DW_TAG_subprogram Debug Info Entry (DIE) describing the ctor but there
are at least two different versions of the ctor emitted (e.g. in-
charge) -- those concrete DIEs will have pc address ranges and
pointers back to the one abstract DW_TAG_subprogram DIE. This kind of
thing can be complex but if you ignore these corner cases you can
probably cook something up that will work a lot of the time.
It may actually be easier for you to get the information you want from
gdb. Put commands like
info line *0x<address>
in a file like "gdbcmds.txt" and then run "gdb --batch --quiet -x
gdbcmds.txt my-dwarf-file" and post-process the output.
Another minor goal is to find analagous functionality
to libcwd to demangle C++ symbol names.
Conveniently enough, gdb can also demangle names. "maint demangle
<mangled name>". Or as another person already mentioned, c++filt will
do what you need.
J
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden