How to manually symbolicate a crash log with atos

18,778

Solution 1

My guess is that you saw the Stackoverflow question with the atos information in it (like I did), but are not calculating the address correctly to put into atos. See here:

iOS crash reports: atos not working as expected

symbol address = slide + stack address - load address

Use otool to get your slide address (usually 0x001000)

otool -arch ARCHITECTURE -l "APP_BUNDLE/APP_EXECUTABLE" | grep -B 3 -A 8 -m 2 "__TEXT"

Scroll to the bottom of your crash log to get your stack address from the binary images section (first address in the list under Binary Images).

Then add it up using the HEX calculator that comes with your mac (use programmer view). Lastly subtract your load address from the stack trace in your crash log (in your case it looks like 0x00012efe).

Put this in atos to get the line that causes the crash:

atos -arch armv7 -o YOURAPP.app'/'yourapp' 0xADDRESSFROMABOVE

Solution 2

You can try and use my script to achieve this: https://github.com/IdoTene/MacosSymbolicateCrash/blob/master/symbolicate.py

It encapsulates the atos command

Or the updated version: https://github.com/samrayner/MacosSymbolicateCrash/blob/master/symbolicate.py.

Share:
18,778

Related videos on Youtube

Fitzy
Author by

Fitzy

Donate: Bitcoin: 18YFRUwQne2cPivXSGWL7AffoCK2qR71Bi Ethereum: 0xAD66D5F9BC59924152361ce4B58aA8fa63A9a9Ae

Updated on October 06, 2022

Comments

  • Fitzy
    Fitzy over 1 year

    After searching all over the internet to find a way to symbolicate my crash logs I received from Apple, I finally figured out how to use the atos command in terminal to symbolicate the crash logs. I have the dSYM file, the .app file and the crash logs in the same folder, and using atos -arch armv7 -o APPNAME I have been able to enter memory addresses, and sometimes (but quite rarely) a method name has come up. To be perfectly honest, I don't have much experience with terminal, or crash logs. Attempting to symbolicate the crash logs from Xcode's organiser has unfortunately done absolutely nothing, and trying to use the symbolicatecrash file within Xcode's package contents has also failed. So here I am, left with the only other option I know of.

    Now, my question is this: how does one go about making heads or tails of these memory addresses? Which addresses must I enter to arrive at the point at which the app crashed? I am 90% of the way there, I just don't know which addresses will give me valuable information or which are useless. Attached here is a picture of a crash log:

    enter image description here

    Any help is greatly appreciated.

  • sgdesmet
    sgdesmet about 7 years
    Is this still necessary? Apple documentation on symbolicating with atos indicates that you just need to supply the load address with the -l argument to atos. E.g. atos -arch armv7 -o YOURAPP.app'/'yourapp' -l 0x11000 0x00012efe