iphone:如何做symobolication的崩溃报告? [英] iphone :How to do symobolication of crash report?
问题描述
在我的应用程式中,我收到当机报告
异常类型:EXC_BAD_ACCESS(SIGBUS)
异常代码:KERN_PROTECTION_FAILURE在0x00000000
崩溃的线程:7
在线程7:
线程7崩溃:
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基金会0x33b88382 0x33b6b000 + 119682
6基金会0x33bfa5c6 0x33b6b000 + 587206
7 libsystem_c.dylib 0x3579530a 0x35762000 + 209674
8 libsystem_c.dylib 0x35796bb4 0x35762000 + 215988
$ b b
但不能显示特定的崩溃文件名称&
如何协调此崩溃报告。我们需要一个名为symbolitecrash的文件来处理这个文件。此文件可以位于 /Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources
-
打开终端。
-
使用-h选项运行此脚本提供了最小的帮助: / p>
UserMM:〜user $ symbolitecrash -h
用法:
/ usr / local / bin / symbolicatecrash [-Ah] [-o] LOGFILE [SYMBOL_PATH ...]
符号崩溃转储LOGFILE,可以是 - 来引用stdin。默认情况下,将尝试使用
所有启发式符号表示所有地址。
其他符号文件可以在指定的目录下找到。
选项:
-A只表示应用程序而不是库
-o如果指定,符号日志将写入OUTPUT_FILE(默认为stdout) / p>
-h显示此讯息
-v详细
li>将.crash文件放置在复制 symbolitecrash 文件的相同位置。
-
崩溃日志,当您编译AppStore的应用程序时,您需要链接器生成的dSYM文件。换句话说,当您构建AppStore时,您应该将dSYM包放在Time Machine备份的安全位置。这个非常重要。 您应该为已发货的应用程序的每个版本保留dSYM的副本。如果您有程序包,将代码偏移量转换为带有行号的函数名称从未如此简单:
<文件到打开终端时显示的默认位置。
例如。终端窗口: -
上次登录:Wed Jun 22 15:28:21 on ttys000
UserMM:〜user $
这里,默认位置是目录user。
$ 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是在同一位置生成的新崩溃文件。
以下是结果:
线程0崩溃:
0 libobjc.A.dylib 0x300c87ec objc_msgSend + 20
1 myApp 0x00006434 - [BoardView setSelectedPiece:](BoardView.m:321)
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.
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
Open the Terminal.
Copy symbolitecrash file to the default location shown when the terminal is opened.
eg. Terminal window :-
Last login: Wed Jun 22 15:28:21 on ttys000 UserMM:~ user$
Here, the default location is the directory "user".
Running this script with the -h option provides the minimal help:
UserMM:~ user$ symbolitecrash -h
usage:
/usr/local/bin/symbolicatecrash [-Ah] [-o ] LOGFILE [SYMBOL_PATH ...]
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.
Options:
-A Only symbolicate the application, not libraries
-o If specified, the symbolicated log will be written to OUTPUT_FILE (defaults to stdout)
-h Display this message
-v Verbose
Place the .crash file in the same location where symbolitecrash file is copied.
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
myApp_2011-06-22-143801_Anands-Ipod1.crash is the new crash file generated in the same location.
Here is the result:
Thread 0 Crashed:
0 libobjc.A.dylib 0x300c87ec objc_msgSend + 20
1 myApp 0x00006434 -[BoardView setSelectedPiece:] (BoardView.m :321)
这篇关于iphone:如何做symobolication的崩溃报告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!