Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DWARF format and stripping



Greg,

I'll have to leave the question about the ordering of your strip shell script phase vs. dsymutil running stage to others, but


On May 31, 2006, at 12:27 PM, Greg Hurrell wrote:

GenerateDSYMFile
cd /Users/ghurrell/work/Test/trunk
/usr/bin/dsymutil -o /Users/ghurrell/work/build/Release/ TestRunner.dSYM /Users/ghurrell/work/build/Release/TestRunner
ERROR: No debug map or DWARF data was found to link.


It's obvious that this is occurring because dsymutil depends on something that's getting stripped previously.

Yes, exactly. When building with DWARF, the debug information is mostly left in object (.o) files. A few pointers are added to the executable noting the location of the .o files and a few other necessary pieces of information. When dsymutil(1) is run on the executable, those bits of information must still be present -- stripping removes them.



4. Does anyone have any pointers on what kind of workflow is necessary to interpret user-submitted crash reports when using dwarf- with-dsym? I know how to use atos on an unstripped binary that contains STABS-format debugging information. But I have no idea at all what the paradigm is with dsym files.

Unfortunately this is a hole in the XCode 2.3 workflow - it's something we'll need to address in a future release. You would run atos on the dSYM file but currently atos can't parse that file. You may be able to jury-rig gdb to do what you need -- gdb being one of the few utilities on the system that understand dSYM files right now. e.g. given an address 0x1234, you can run gdb on the dSYM file and type "info line *0x1234" to get the source line information. A concrete example given an address of 0x2696 from a crashdump of gdb- i386-apple-darwin:


% echo 'info line *0x2696' > /tmp/gdbcmds
% gdb --batch --quiet -x /tmp/gdbcmds gdb-i386-apple-darwin.dSYM/ Contents/Resources/DWARF/gdb-i386-apple-darwin
Line 28 of "/tmp/gdb.roots/gdb/src/gdb/gdb.c" starts at address 0x2696 <main> and ends at 0x269d <main+7>.
%



Using gdb to do a simple address-to-source-line translation is a bit of overkill but this should work for the time being.


Jason
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden
References: 
 >DWARF format and stripping (From: Greg Hurrell <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.