• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: creating a load map to associate addresses with symbols
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >creating a load map to associate addresses with symbols (From: Brendan Creane <email@hidden>)

  • Prev by Date: Re: debug universal binary on 10.3?
  • Next by Date: Inline Woes
  • Previous by thread: Re: creating a load map to associate addresses with symbols
  • Next by thread: Inline Woes
  • Index(es):
    • Date
    • Thread