如何利用crash report来定位出错的代码(Steps to analyze crash report from apple)

原文地址:http://www.eigo.co.uk/Deciphering-iPhone-Crash-Logs.aspx


The follow are lines of a crash log within this thread:

Thread 6
0 WebCore 0x3029a7c2 0x3023d000 + 382914
1 WebCore 0x3029ac96 0x3023d000 + 384150
... ...
17 MyApp 0x00004ee2 0x1000 + 16098


Atos (Address to Symbol) is a simple tool that translates memory addresses to symbols. All that you require to use this tool is a copy of the exact binary file sent to Apple for submission.


The basic use for this tool is as follows:

Syntax: # atos [–o executable] [address ...]
  Example: # atos FixMobile 0x00004ee2
(where # symbol is the bash command line)


This will output to the console all the information that atos can determine about the memory address in the executable, for example:

- [MyViewController MyMethod:] (in ProjectName) (MyViewController.m:431)


when dealing with a "standard(armv6 armv7" (used to be called universal) app, note that you have to specify the arch on the commandline or you will get a message of the form cannot load symbols for the file . eg in directory where the .app and .dsym sit atos -o myApp.ap/myApp -arch armv7 0x00b7eec


the same from http://stackoverflow.com/questions/1460892/symbolicating-iphone-app-crash-reports

Steps to analyze crash report from apple:

1.Copy the release .app file which was pushed to the appstore, the .dSYM file that was created at the time of release and the crash report receive from APPLE into a FOLDER.

2.OPEN terminal application and go to the folder created above (using CD command)

atos -arch armv7 -o ''/'<.dSYM filename here>' . The memory location should be the one at which the app crashed as per the report.

Ex: atos -arch armv7 -o 'app name.app'/'app name' 0x0003b508

This would show you the exact line, method name which resulted in crash.

Ex: [classname functionName:]; -510

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值