Last Updated: May 20, 2019
·
42.74K
· brainfree

Symbolicating an iOS crash log without the original dSYM file

If you're like me and always have issues with the "easy" processes of symbolicating a crash log (drag it to Organizer... as if), you can still brute force the symbolication process to get to the relevant stack traces. First, this does require that you at least have the exact binary version of the app the crash occurred under (but you don't need the dSYM). If you aren't sure which version of the app the crash log came from, you can compare the UUID mentioned in the crash log to the UUID of any relevant binaries you might have saved locally. You can find the UUID of your local app build by running...

dwarfdump -u /path/to/MyApp.app/MyApp

You can start by attempting to symbolicate the crash log with symbolicatecrash. This will often at least fill in the system calls for you. You can leave off the dSYM parameter you might otherwise have used.

symbolicatecrash /path/to/MyApp_2012-10-01_Device.crash

Just for posterity, in case you do have the dSYM, you can use it as such:

symbolicatecrash /path/to/MyApp_2012-10-01_Device.crash /path/to/MyApp.app.dSYM

If that works, you're lucky, and don't need to worry about the rest of this post.

Setting up the nice convenience method I used above:

alias symbolicatecrash='/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources/symbolicatecrash'

To find symbolicatecrash, should it differ from my alias above:

find /Applications/Xcode.app -name symbolicatecrash -type f

And, in case you get an error that DEVELOPER_DIR can't be found:

export DEVELOPER_DIR='/Applications/Xcode.app/Contents/Developer'

Next, use atos to symbolicate each memory address individually. Pull the memory address from the actual text of the crash log. Make sure to use the correct architecture version for the device now that we have armv7s to pay attention to as well.

atos -arch armv7 -o /path/to/MyApp.app/MyApp 0x0003b508

Repeat this for every method you want to symbolicate. It's time consuming, but if you are left with no other choices, this will at least unravel the mystery for you.

I suspect these tools will require that you've installed the command line tools through Xcode manually since they're no longer included in the base download. However, I've never actually tried running them without having done that install first, so I can't say for sure.

Anyway, I hope this helps out when you're in the tough bind of not having the original dSYM, or if your crash log is just failing to symbolicate correctly for any other annoying reason.

10 Responses
Add your response

Great post! This helped me a lot! I am debugging a game using Unity3D and atos worked for me.

over 1 year ago ·

Thanks, This post helped a lot

over 1 year ago ·

Thanks, it helped!

over 1 year ago ·

Thanks - exactly what I needed to get access to the crashing lines of code. Nice job

over 1 year ago ·

Very cool. How did you go about figuring this out? Slowly accumulating Apple knowledge?

over 1 year ago ·

not working for me, don't know why

atos -arch armv7 -o myapp.ipa/myapp 0xc6e250
atos cannot load symbols for the file myapp.ipa/myapp for architecture armv7.

all is in the folder, ipa, dsym, .map.. any ideas?

over 1 year ago ·

It's not working for me. I don't have dSYM and from atos I've got only some addresses instead of method names and lines. I'm not sure it is possible to get that kind of information without dSYM. Maybe it's possible if you attach symbols in your IPA package?

I have only IPA package that was uploaded to App Store and it has no symbols.

over 1 year ago ·

How to deal with core files and dSYM standalone debug symbols? and not the crash logs.

over 1 year ago ·

This article is retarted. Thanks for wasting my time reading it. First rule of writing an article: respond to your comments if they are asking questions! This method won't work if you don't have the dSYM file to begin with...which makes this article pointless. The manpage for atos states: If full debug symbol information is available, for example in a .app.dSYM sitting besides a .app, then the output of atos will include file name and source line number information. So what happens if there's no dSYM? Nothing. You just get back the memory address you are trying to convert to a readable symbol. Useless.

over 1 year ago ·

it

over 1 year ago ·