IOS Crash Analysis (Article 3)-symbolic Crash log
IOS Crash Analysis (Article 3)-symbolic Crash log
The unsigned crash log is like a book of days. You cannot understand it, let alone analyze the cause of the crash. Therefore, before analyzing logs, We need to translate the logs into words that we can understand. This step is called symbolic.
Two symbolic methods have been mentioned in iOS Crash Analysis (Article 1:
1. Use Xcode for symbolic use 2. Use symbolicatecrash script for symbolic use
In fact, both of these analysis methods use the same tool as the symbolic: *** atos ***.
Atos is a symbolic tool provided by Apple. It is installed on Mac OS by default.
The dsym file is required to use the *** atos *** symbol. Dsym files are generated during project compilation. You can find all archive application files under the Archives tab of Xcode Organizer. It stores detailed information about the compilation process, including symbolic information.
Note: You must keep both the application binary file and the. dSYM file to complete the symbolic crash log. Every time you submit a build to iTunes Connect, you must archive it .. DSYM files and binary files are specifically bound to each build and subsequent build. Even if they come from the same source code file, each build is different from other builds and cannot be replaced with each other. If you use the Build and Archive commands, these files are automatically placed in the appropriate location. If you do not use the Build and Archive commands, place them in a location that can be searched by Spotlight (such as the Home directory.
Next we use *** atos *** to sign a Crash.
Let's look at the following example:
### 1. process Information ### Incident Identifier: E4201F10-6F5F-40F9-B938-BB3DA8ED7D50CrashReporter Key: TODOHardware Model: iPhone4, 1 Process: Taobao4iPhone [3538] Path:/var/mobile/Applications/E3B51E77-D44D-4B3E-8767-B7DC2008D138/Taobao4iPhone. app/Taobao4iPhoneIdentifier: com. taobao. taobao4iphoneVersion: 4.8.1Code Type: ARMParent Process: launchd [1] ### 2. basic info ### Date/Time: 21:39:30 + iPhone OS Version: iPhone OS 7.1.2 (11D257) Report Version: 104 ### 3. exception information ### Exception Type: SIGSEGVException Codes: SEGV_ACCERR at 0xa2400db3Crashed Thread: 0 ### 4. thread backtracking ### Thread 0 name: Dispatch queue: com. apple. main-thread ### 5. crash call stack ### Thread 0 Crashed: 0 libobjc. a. dylib release 0x38375000 + 752761 Taobao4iPhone release 0x66000 + 192440012 Taobao4iPhone release 0x66000 + 192443673 Foundation release + 8072674 CoreFoundation release 0x2da2a000 + 6516235 CoreFoundation release 0x2da2a000 + 6506236 CoreFoundation release 0x2da2a000 + 6433557 CoreFoundation certificate 0x2da2a000 + 324478 CoreFoundation 0x2da31a3 0x2da2a000 + 319079 GraphicsServices certificate 0x32982000 + 3849910 UIKit 0x3037e14d 0x30310000 + 45089311 bytes limit 0x66000 + 2132112 Taobao4iPhone certificate 0x66000 + 17896 Thread 1:0 libsystem_kernel.dylib 0x38928808 0x38928000 + 20561 libdispatch. dylib 0x38869e03 0x3885f000 + 44547 ### 5. dynamic library information ### Binary Images: 0x66000-0x19cdfff + Taobao4iPhone armv7 <43ebe409980f31fd9be165a64b002af5>/var/mobile/Applications/E3B51E77-D44D-4B3E-8767-B7DC2008D138/Taobao4iPhone. app/Taobao4iPhone 0x9fa9000-0x9fb4fff QuickSpeak armv7
/System/Library/AccessibilityBundles/QuickSpeak. bundle/QuickSpeak0x2c667000-0x2c669fff AXSpeechImplementation armv7
/System/Library/AccessibilityBundles/AXSpeechImplementation. bundle/AXSpeechImplementation
I will select a call to be symbolic:
1 Taobao4iPhone 0x012c03e1 0x66000 + 19244001
Use the following command to sign:
atos -arch armv7 -o "Taobao4iPhone.app.dSYM" -l 0x66000 0x012c03e1
Result:
1 Taobao4iPhone 0x012c03e1 -[TBSNSPagesContainerView subviewLayoutPage:] (in Taobao4iPhone) (TBSNSPagesContainer.m:227)
The collapsed class is TBSNSPagesContainerView. The function is subviewLayoutPage. The file name is TBSNSPagesContainer. m and the number of rows is 227.
Let's take a look at the usage of atos:
Atos-o dysm file path-l module load address-arch cpu instruction set type call method address
Dysm file path: all archived application files can be found in the Archives tab of Xcode Organizer. It stores detailed information about the compilation process, including symbolic information.
Module load address: The base address of the module load. You can find the base address of the corresponding module in the ** dynamic library information ** of the log. 0x66000
Cpu Instruction Set Type: armv6 armv7 armv7s arm64. For specific information, see ** dynamic library information ** of the corresponding module. For example
0x66000 - 0x19cdfff +Taobao4iPhone armv7 <43ebe409980f31fd9be165a64b002af5> /var/mobile/Applications/E3B51E77-D44D-4B3E-8767-B7DC2008D138/Taobao4iPhone.app/Taobao4iPhone
The cpu Instruction Set of the Taobao4iPhone module is armv7.
Call method address: 0x012c03e1, which is explained in iOS Crash Analysis (article 2 ).