IOS Crash parsing symbolic crash logs

Source: Internet
Author: User

Reference:

http://blog.csdn.net/diyagoanyhacker/article/details/41247367

http://blog.csdn.net/diyagoanyhacker/article/details/41247389

http://blog.csdn.net/diyagoanyhacker/article/details/41247411

Http://www.cnblogs.com/smileEvday/p/Crash1.html

The unsigned crash log is like a book of heavenly books, not understood, let alone analyze the cause of the crash. So before we analyze the logs, we need to translate the logs into words that we can read. This step we call symbolic.

Crash report file in/library/logs/crashreporter


There are two ways to symbolize in iOS crash Analysis (article I):

1. Use Xcode to symbolize 2. Using Symbolicatecrash scripting notation

In fact, both of these analysis methods use the same tool symbolized: ***atos***.
Atos is an apple-provided symbolic tool that is installed by default on Mac OS systems.
Using ***atos*** notation requires dsym files. dSYM files are generated when the project is compiled, and all archived application files can be found under the Archives tab bar of Xcode organizer. It holds detailed information about the compilation process, including symbolic information.

注意: 你必需同时保留应用二进制文件和.dSYM文件才能将崩溃日志完整符号化。每次提交到iTunes Connect的构建都必需归档。.dSYM文件和二进制文件是特定绑定于每一次构建和后续构建的,即使来自相同的源代码文件,每一次构建也与其他构建不同,不能相互替换。如果你使用Build 和 Archive 命令,这些文件会自动放在适当位置。 如果不是使用Build 和 Archive命令,放在Spotlight能够搜索到的位置(比如Home目录)即可。



Let's use ***atos*** to symbolize a crash
Or look at the following example:

# # # 1. Process Information # # #Incident Identifier:e4201f10-6f5f-40f9-b938-bb3da8ed7d50crashreporter key:todohardware Model:iphon E4,1process:taobao4iphone [3538]path:/var/mobile/applications/e3b51e77-d44d-4b3e-8767-b7dc2008d138/ta Obao4iphone.app/taobao4iphoneidentifier:com.taobao.taobao4iphoneversion:4.8.1code type:armparent Pro Cess:launchd [1]### 2. Basic Information # # #Date/time:2014-09-16 21:39:30 +0000os 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 0x3838760c 0x38375000 + 752761 taobao4iphone 0x012c03e1 0x66000 + 1924 40012 taobao4iphone 0x012c054f 0x66000 + 192443673 Foundation 0x2e4de16   3 0x2e419000 + 8072674 corefoundation                   0x2dac9167 0x2da2a000 + 6516235 corefoundation 0x2dac8d7f 0x2da2a000 + 6506236 Corefoundation 0x2dac711b 0x2da2a000 + 6433557 corefoundation 0x2da31ebf 0x2d                    a2a000 + 324478 corefoundation 0x2da31ca3 0x2da2a000 + 319079 graphicsservices                       0x3298b663 0x32982000 + 3849910 UIKit 0x3037e14d 0x30310000 + 45089311 Taobao4iphone   0x0006b349 0x66000 + 2132112 taobao4iphone 0x0006a5e8 0x66000 + 17896Thread 1:0 Libsystem_kernel.dylib 0x38928808 0x38928000 + 20561 libdispatch.dylib 0x38869e03 0x3885 f000 + 44547### 5. Dynamic Library Information # # #Binary images:0x66000-0x19cdfff +taobao4iphone armv7 &LT;43EBE409980F31FD9BE165A64B002AF  5>/var/mobile/applications/e3b51e77-d44d-4b3e-8767-b7dc2008d138/taobao4iphone.app/taobao4iphone 0x9fa9000- 0X9FB4FFF Quickspeak ARMv7 <Eda7aee380373fad88f17971512f2777>/system/library/accessibilitybundles/quickspeak.bundle/ QUICKSPEAK0X2C667000-0X2C669FFF axspeechimplementation armv7 <fceb6d31f58d3c41afa9ace822d266a7>/system/ Library/accessibilitybundles/axspeechimplementation.bundle/axspeechimplementation

I select a call to symbolize:

1   Taobao4iPhone                       0x012c03e1 0x66000 + 19244001

Use the following command to symbolize:

atos -arch armv7 -o "Taobao4iPhone.app.dSYM" -l 0x66000 0x012c03e1

Results:

1   Taobao4iPhone   0x012c03e1 -[TBSNSPagesContainerView subviewLayoutPage:] (in Taobao4iPhone) (TBSNSPagesContainer.m:227)

You can see that the crash class is Tbsnspagescontainerview, the function is subviewlayoutpage, the file name is TBSNSPAGESCONTAINER.M, and the row count is 227 rows.

Let's go back and look at the Atos usage:

atos -o dysm文件路径 -l 模块load地址 -arch cpu指令集种类 调用方法的地址

Dysm file path: All archived app files can be found under the Archives tab bar in Xcode organizer. It holds 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. This is 0x66000.
CPU instruction set Type: Can be armv6 armv7 armv7s arm64. Specifically, you can refer to the corresponding module in the dynamic library information * * * to determine. Such as

0x66000 -  0x19cdfff +Taobao4iPhone armv7  <43ebe409980f31fd9be165a64b002af5> /var/mobile/Applications/E3B51E77-D44D-4B3E-8767-B7DC2008D138/Taobao4iPhone.app/Taobao4iPhone

Then the CPU instruction set of the Taobao4iphone module is ARMV7

The same executable program, the dynamic library can be the same operation, including the symbolic link information.

I do not know why atos-arch arm64 instruction set is not available.

IOS Crash parsing symbolic crash logs

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.