在我的应用程序中,我收到了崩溃报告
In my app i got crash report
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00000000
Crashed Thread: 7
In Thread 7 :
Thread 7 Crashed:
0 CoreFoundation 0x3728ba96 0x37278000 + 80534
1 CFNetwork 0x36617b84 0x36616000 + 7044
2 CFNetwork 0x36617af6 0x36616000 + 6902
3 MusicBandApp 0x0000bbfc 0x1000 + 44028
4 MusicBandApp 0x0000b740 0x1000 + 42816
5 Foundation 0x33b88382 0x33b6b000 + 119682
6 Foundation 0x33bfa5c6 0x33b6b000 + 587206
7 libsystem_c.dylib 0x3579530a 0x35762000 + 209674
8 libsystem_c.dylib 0x35796bb4 0x35762000 + 215988
但无法显示特定的崩溃文件名和行号.
but can"t show particular crash file name & line number.
如何对这个崩溃报告进行虚拟化.
How can sybolicate this crash report.
我们需要一个名为 symbolitecrash 的文件来处理这个文件.该文件可以位于 /Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources
We need a file called symbolitecrash to process this file. This file can be located in /Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources
打开终端.
将symbolitecrash文件复制到终端打开时显示的默认位置.
Copy symbolitecrash file to the default location shown when the terminal is opened.
例如.终端窗口:-
上次登录时间:ttys000 上的 6 月 22 日星期三 15:28:21用户MM:~用户$
Last login: Wed Jun 22 15:28:21 on ttys000 UserMM:~ user$
这里,默认位置是用户"目录.
Here, the default location is the directory "user".
使用 -h 选项运行此脚本提供的帮助很少:
Running this script with the -h option provides the minimal help:
UserMM:~ user$ 符号崩溃 -h
UserMM:~ user$ symbolitecrash -h
用法:
/usr/local/bin/symbolicatecrash [-Ah] [-o ] LOGFILE [SYMBOL_PATH ...]
/usr/local/bin/symbolicatecrash [-Ah] [-o ] LOGFILE [SYMBOL_PATH ...]
表示一个故障转储 LOGFILE,它可能是-"来引用标准输入.默认情况下,
Symbolicates a crashdump LOGFILE which may be "-" to refer to stdin. By default,
将采用所有启发式方法来尝试符号化所有地址.
all heuristics will be employed in an attempt to symbolicate all addresses.
可以在指定目录下找到其他符号文件.
Additional symbol files can be found under specified directories.
选项:
-A 只表示应用程序,而不是库
-A Only symbolicate the application, not libraries
-o 如果指定,符号化的日志将被写入 OUTPUT_FILE(默认为 stdout)
-o If specified, the symbolicated log will be written to OUTPUT_FILE (defaults to stdout)
-h 显示这条消息
-v 详细
将 .crash 文件放在复制 symbolitecrash 文件的位置.
Place the .crash file in the same location where symbolitecrash file is copied.
要将符号添加到崩溃日志,您需要在为 AppStore 编译应用程序时由链接器生成的 dSYM 文件.换句话说,当您为 AppStore 构建时,您应该将 dSYM 包保存在由 Time Machine 备份的安全位置.这是非常重要的.您应该为曾经发布的每个应用程序版本保留一份 dSYM 副本.如果你有这个包,将代码偏移量转换为带有行号的函数名从未如此简单:
To add symbols to the crash log you need the dSYM file generated by the linker when you compiled your application for AppStore. In other words, when you build for AppStore you should keep the dSYM package in a safe place backed up by Time Machine. This is very important. You should keep a copy of the dSYM for each version of your application ever shipped. If you have the package, translating code offsets to function names with line numbers has never been easier:
$ symbolicatecrash MiMo_2011-06-22-143801_Anands-Ipod.crash myApp.app.dSYM > myApp_2011-06-22-143801_Anands-Ipod1.crash
$ symbolicatecrash MiMo_2011-06-22-143801_Anands-Ipod.crash myApp.app.dSYM > myApp_2011-06-22-143801_Anands-Ipod1.crash
myApp_2011-06-22-143801_Anands-Ipod1.crash 是在同一位置生成的新崩溃文件.
myApp_2011-06-22-143801_Anands-Ipod1.crash is the new crash file generated in the same location.
结果如下:
Thread 0 Crashed:
0 libobjc.A.dylib 0x300c87ec objc_msgSend + 20
1 myApp 0x00006434 -[BoardView setSelectedPiece:] (BoardView.m :321)
这篇关于iphone:如何对崩溃报告进行符号化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!