问题
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:
Any help is greatly appreciated.
回答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
回答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.
来源:https://stackoverflow.com/questions/13970959/how-to-manually-symbolicate-a-crash-log-with-atos