利用.dSYM和.app文件准确定位Crash位置

http://blog.csdn.net/jinzhu117/article/details/20615991


利用.dSYM和.app文件准确定位Crash位置

分类: iPhone   1505人阅读  评论(0)  收藏  举报
首先,确保在release(Ad Hoc或者App Store)一个版本时,保存了对应的xxx.app和xxx.dSYM文件。

其次,验证xxx.crash、xxx.app和xxx.dSYM三者的uuid是否一致。

验证方法:

1)查看xxx.app的uuid。

[plain]  view plain copy 在CODE上查看代码片 派生到我的代码片
  1. $ dwarfdump --uuid mobileguard.app/mobileguard  

2)查看xxx.dSYM的uuid。

[plain]  view plain copy 在CODE上查看代码片 派生到我的代码片
  1. $ dwarfdump --uuid mobileguard.app.dSYM/Contents/Resources/DWARF/mobileguard  

3)xxx.crash。

Note:

在这之前,需要找到对应的app和dSYM文件。这两个文件是在后缀为.archive的文件中,在我的机器(Mac OS 10.9.1,Xcode5.0.2)上,.archive文件在“/Users/mikelin/Library/Developer/Xcode/Archives/”文件夹下对应的日期文件夹中,也可以从Xcode > Organizer > Archive 下找到对应的Archive包。

确保三者uuid一致以后,用symbolicatecrash工具生成易读的日志信息。

先准备环境:

1)链接symbollicatecrash到/usr/bin/中,就可以直接使用sybollicatecrash命令。


Xcode6.1路径在:

Xcode6.0.app ▸ Contents ▸ SharedFrameworks ▸ DTDeviceKitBase.framework ▸ Versions ▸ A ▸ Resources

symbolicatecrash


[plain]  view plain copy 在CODE上查看代码片 派生到我的代码片
  1. $ ln -s  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKitBase.framework/Versions/A/Resources/symbolicatecrash /usr/bin/symbolicatecrash   

2)设置xcode DEVELOPER_DIR。

[plain]  view plain copy 在CODE上查看代码片 派生到我的代码片
  1. export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer"  

然后执行命令:

[plain]  view plain copy 在CODE上查看代码片 派生到我的代码片
  1. symbolicatecrash m.crash mobileguard.app.dSYM > n.crash  

接下来是最重要的环节:

[plain]  view plain copy 在CODE上查看代码片 派生到我的代码片
  1. $ xcrun atos -arch armv7 -o mobileguard.app/mobileguard 0x00037000  

下面这个是我机器上看到的结果:

[plain]  view plain copy 在CODE上查看代码片 派生到我的代码片
  1. $ xcrun atos -arch armv7 -o mobileguard.app/mobileguard 0x00037000  
  2. -[MobileLocationViewCtrl viewDidLoad] (in mobileguard) (MobileLocationViewCtrl.m:56)  
0
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值