IOS crash log backtrace symbol
iOS crash log with dSYM files can find the crash of BackTrace, which is the most important information to solve the crash.
If you are packaging on the same Mac, import crash log will automatically sign BackTrace, you can see the method name, file name and line number
However, sometimes the version of the package is not packaged on your Mac, Xcode can't find the corresponding symbol table, BackTrace can not be symbolized as follows:
Last Exception BackTrace:
0 corefoundation 0x2cb535f2 __exceptionpreprocess + 122
1 LIBOBJC. A.dylib 0x3a3c5c72 Objc_exception_throw + 34
2 corefoundation 0x2ca67152-[__nsarraym objectatindex:] + 226
3 MyApp 0x004fe736 0x9b000 + 4601654
4 MyApp 0x00507ed4 0x9b000 + 4640468
5 MyApp 0x004fd112 0x9b000 + 4595986
6 MyApp 0x003275c6 0x9b000 + 2672070
The second line here can be seen as an array objectatindex throw an exception, but the 3-6 line is from the application of their own code MyApp, this information is the most important.
In fact, as long as there is the original app file, you can find this information.
Method:
Put the corresponding version of the Myapp.app file and the crash file under the same folder, note that the correct version of the app must be applied, because each time the package, the mapping of the symbol table may be different, if the wrong should not be symbolic.
And then run
Atos-arch armv7-o myapp.app/myapp-l 0x9b000 0x004fe736
This method-arch later refers to the hardware architecture:
iphone 1,2,3 is ARMv6
Iphone4,4s is armv7.
IPHONE5,5C is armv7s.
iphone 5s, 6, 6+, 6s, 6s+ is arm64
Depending on the device in which the crash occurred, Myapp.app is the file name of your app, and the two 16 numbers following the option L are key:
The first number, take the 4th column of the row to be parsed by BackTrace, the second number to the 3rd column, and the corresponding method name, file name, and line number.
In this way, the above 3-6 lines can be parsed out of one line, you can see where the crash occurred, and then the analysis is simple.