Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symbolicating crash logs in XCode 4.3.2

Whenever a crash happens on my application, the crash logs are shown in symbolicated form inside the organizer. Now the problem is that all memory addresses that points to iOS classes are getting symbolicated fine but memory addresses of my application classes are not getting symbolicated. Which XCode project property do I need to set to enable them.

These are the current build settings which enabled symbolication of iOS classes. I am using XCode 4.3.2.

Current build settings

like image 446
Abhinav Avatar asked Apr 12 '12 22:04

Abhinav


2 Answers

Have you turned off spotlight? symbolicatecrash uses spotlight to find the binaries and dsym files, so if you've turned off spotlight then it won't be able to find them. Anyway, here is how to convert a hex stacktrace address into a line number:

[1] Find the .dSym file by going to XCode->Organizer, clicking on archives, then right click on the archive, and cd into this directory (you can just drag the folder into a shell window).

[2] cd into the dSYMs directory.

[3] run the dwarfdump command to translate the hex address into a line number in your code:

dwarfdump --arch armv7 myApp.dSYM --lookup 0xaabbccdd | grep 'Line table'
like image 93
CpnCrunch Avatar answered Nov 03 '22 00:11

CpnCrunch


Strip Debug Symbols During Copy: Should be YES on non debug configuration builds, since it will blow up your app binary 30-50%

Debug Information Format: Should be DWARF with dSYM File for all configurations, to be able to symbolicate your symbols from any binary.

Now I guess that you are trying this on debug builds, on builds that are not the latest results of the build command in Xcode. You have to remember that every time you run the build command, a new executable and a new dSYM package is being generated, and the previous one gets overridden! (Except if you use the Archive feature)

The symbolication script parses the UUID from the crash report of your app and searches the corresponding .app AND .app.dSYM bundle via spotlight. So if either spotlight is not indexing the target path or the binaries are replaced by another build run, it won't be able to symbolicate the apps symbols.

like image 24
Kerni Avatar answered Nov 03 '22 00:11

Kerni