How to manually symbolicate a crash log with atos
Asked Answered
A

2

7

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.

Alanna answered 20/12, 2012 at 11:14 Comment(0)
S
12

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
Sutter answered 8/1, 2013 at 19:26 Comment(1)
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 Dortheydorthy
I
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.

Iscariot answered 11/2, 2018 at 9:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.