简体   繁体   中英

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.

当前的构建设置

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.

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'

Try setting Deployment postprocessing to NO.

DEPLOYMENT_POSTPROCESSING. Activating this setting indicates that binaries should be stripped and file mode, owner, and group information should be set to standard values.

It seems that xcode uses last archived build .dsym file to symbolicate your logs (even in debug), so try archiving your app .

After archiving your app Re-Symbolicate your crash reports.

It worked for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM