iPhone SDK 3.0和符号化不赶紧? [英] iPhone SDK 3.0 and symbolicatecrash not getting along?

查看:156
本文介绍了iPhone SDK 3.0和符号化不赶紧?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

* UPDATE *
我重新安装了Snow Leopard,干净安装。完全擦除了我现有的Leopard安装。相同的问题仍然存在。

* UPDATE * I've reinstalled with Snow Leopard, clean install. Completely wiped my existing Leopard install. Same problem persists.

我已经尝试过很多版本的symbolicatecrash来解决崩溃报告中的符号。从苹果提供的版本,到Alan的Quatermain的版本发布在GitHub上,最后从 http://openradar.appspot.com / 6438643

I've tried numbers of versions of symbolicatecrash to resolve symbols in my crash reports. From the version provided by Apple, to Alan's Quatermain's version posted on GitHub and finally from http://openradar.appspot.com/6438643.

无论什么原因,我可以得到的最好的结果是我自己的库上的符号得到解决。通常,这是足够的数据,指向我在正确的方向 - 其他时间,它不是。使用2.x我没有问题获取我的代码的符号+苹果提供的库从每个线程的堆栈跟踪。

For whatever reason, the best results I can get is for symbols on my own libraries to get resolved. Normally, this is enough data to point me in the right direction -- other times it is not. With 2.x I had no problems getting the symbols for my code + Apple provided libraries from within the stack traces in each thread.

很可能是一个问题,我的环境在这里,我完全不怀疑苹果或Alan所做的工作。是的,我确定dSYM我已经藏起来是一样的生成崩溃报告。

Most likely an issue with my environment here, I'm not at all doubting the work that Apple or Alan have done. Yes I'm certain the dSYM I have stashed away is the same exact one that's generating the crash report.

虽然'Foo'是我,并从它的符号是精彩,我需要从堆栈中的其他功能的符号来真正了解我的报告。

Although 'Foo' is me, and getting symbols from it is wonderful, I need to see symbols from the other functions in the stack to truly understand my reports.

注意:对于在iPhone OS 2.2.1上运行应用程序崩溃的设备,我没有问题得到所有的符号。这是一个出现的iPhone OS 3.0问题。

Note: For devices that crash running the app on iPhone OS 2.2.1, I have no problem getting all symbols. This is an iPhone OS 3.0 issue it appears.

此外,在详细模式下运行symbolicatecrash这里有一些东西,我把错误:

Also, while running symbolicatecrash in verbose mode here's a few of the things that struck me as wrong:

- NO MATCH
NOT searching in Spotlight for dsym with UUID of /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
## Warning: Can't find any unstripped binary that matches version of /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation

..........fetching symbol file for libobjc.A.dylib--[undef] 
Searching [/Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.0 (5A345)/Symbols/usr/lib/libobjc.A.dylib /Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.0 (5A347)/Symbols/usr/lib/libobjc.A.dylib /Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.0.1 (5B108)/Symbols/usr/lib/libobjc.A.dylib /Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.0.2 (5C1)/Symbols/usr/lib/libobjc.A.dylib /Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.1.1/Symbols/usr/lib/libobjc.A.dylib /Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.1/Symbols/usr/lib/libobjc.A.dylib /Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.2.1/Symbols/usr/lib/libobjc.A.dylib /Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.2/Symbols/usr/lib/libobjc.A.dylib /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.0 (7A341)/Symbols/usr/lib/libobjc.A.dylib]...--[/Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.0 (5A345)/Symbols/usr/lib/libobjc.A.dylib] -- NO MATCH
--[/Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.0 (5A347)/Symbols/usr/lib/libobjc.A.dylib] -- NO MATCH
--[/Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.0.1 (5B108)/Symbols/usr/lib/libobjc.A.dylib] -- NO MATCH
--[/Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.0.2 (5C1)/Symbols/usr/lib/libobjc.A.dylib] -- NO MATCH
--[/Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.1.1/Symbols/usr/lib/libobjc.A.dylib] -- NO MATCH
--[/Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.1/Symbols/usr/lib/libobjc.A.dylib] -- NO MATCH
--[/Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.2.1/Symbols/usr/lib/libobjc.A.dylib] -- NO MATCH
--[/Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.2/Symbols/usr/lib/libobjc.A.dylib] -- NO MATCH
--[/Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.0 (7A341)/Symbols/usr/lib/libobjc.A.dylib] -- NO MATCH
NOT searching in Spotlight for dsym with UUID of /usr/lib/libobjc.A.dylib
## Warning: Can't find any unstripped binary that matches version of /usr/lib/libobjc.A.dylib

以下是通过symbolicatecrash运行崩溃报告的示例:

Here's an example of the crash report after running it through symbolicatecrash:

Thread 0 Crashed:
0   libSystem.B.dylib                   0x31dc476c 0x31d46000 + 517996
1   libSystem.B.dylib                   0x31dc4755 0x31d46000 + 517973
2   Foo                            0x00053075 uncaught_exception_handler + 21
3   CoreFoundation                      0x3028f65f 0x301fd000 + 599647
4   libobjc.A.dylib                     0x30013693 0x3000c000 + 30355
5   libstdc++.6.dylib                   0x374ccc2d 0x3748a000 + 273453
6   libstdc++.6.dylib                   0x374ccc81 0x3748a000 + 273537
7   libstdc++.6.dylib                   0x374ccd4d 0x3748a000 + 273741
8   libobjc.A.dylib                     0x300135ff 0x3000c000 + 30207
9   CoreFoundation                      0x30222f2d 0x301fd000 + 155437
10  CoreFoundation                      0x30222ecb 0x301fd000 + 155339
11  Foundation                          0x30521e33 0x30501000 + 134707
12  Foundation                          0x30570d47 0x30501000 + 458055
13  Foo                            0x0000a1db -[Bar barfoo] (Bar.m:1617)
14  Foo                            0x00032f73 -[MyViewController foobar] (MyViewController.m:727)
15  Foo                            0x000329b9 -[MyViewController foobar] (MyViewController.m:666)
16  Foo                            0x00031fab -[MyViewController tabBar:tabSelected:] (MyViewController.m:440)
17  Foo                            0x00068d41 -[TTTabBar setSelectedTabIndex:] (TTTabBar.m:160)
18  Foo                            0x00068ca3 -[TTTabBar setSelectedTabView:] (TTTabBar.m:142)
19  Foo                            0x000689cf -[TTTabBar tabTouchedUp:] (TTTabBar.m:83)
20  CoreFoundation                      0x302552f9 0x301fd000 + 361209
21  UIKit                               0x3094d101 0x308ed000 + 393473
22  UIKit                               0x3094d0a1 0x308ed000 + 393377
23  UIKit                               0x3094d073 0x308ed000 + 393331
24  UIKit                               0x3094cdcd 0x308ed000 + 392653
25  UIKit                               0x309779c1 0x308ed000 + 567745
26  UIKit                               0x30977011 0x308ed000 + 565265
27  UIKit                               0x309767d9 0x308ed000 + 563161
28  UIKit                               0x30923613 0x308ed000 + 222739
29  UIKit                               0x30923163 0x308ed000 + 221539
30  GraphicsServices                    0x32045a4d 0x32041000 + 19021
31  CoreFoundation                      0x30253041 0x301fd000 + 352321
32  CoreFoundation                      0x30252771 0x301fd000 + 350065
33  GraphicsServices                    0x32044b0f 0x32041000 + 15119
34  GraphicsServices                    0x32044bbb 0x32041000 + 15291
35  UIKit                               0x308f0363 0x308ed000 + 13155
36  UIKit                               0x308ef121 0x308ed000 + 8481
37  Foo                            0x00002097 main (main.m:13)  


推荐答案

Greg的建议, t为我工作,但帮助指向正确的方向
获得plcrashreporter日志(记者版103)再次象征与sdk 4.0。

Greg's suggestions, didn't work for me but helped to point the right direction to get plcrashreporter logs (reporter version 103) to symbolize again with sdk 4.0.

BTW:这是一个问题,你肯定会与在较新的设备(armv7)创建的报告
,因为符号假设报告版本103是armv6。

BTW: this is an issue you will definitly have with reports created on newer devices (armv7) because symbolicate assumes reports version 103 are armv6.

从最新的symbolicatecrash脚本(sdk 4.0)使。
注意:根据编辑器u的使用,编辑后可能需要设置可执行位。
chmod 755 symbolicatecrash

make a copy from the newest symbolicatecrash script (sdk 4.0) for the changes you make. Note: depending on the editor u use you might have to set the executable bit after editing. chmod 755 symbolicatecrash

这是因为预设值设为armv6。

this is because the default is set to armv6.

code> sub parse_images 设置默认架构 my $ default_arch ='armv7';

Resolution: in sub parse_images set the default architecture my $default_arch = 'armv7';

删除一些在103个报告中似乎无效的限制)

Resolution: (hack: removing some restrictions that don't seem to work on 103 reports)

replace:

$app = $bundlename if (!defined $app && defined $image{plus} && length $image{plus});

由:

$app = $bundlename if (!defined $app);






4)问题:从otool



解决方法:Greg修复 sub matchesUUID

replace:

} else { die "Can't understand the output from otool ($TEST_uuid)"; }

} else { if ($arch eq "armv7") { return matchesUUID($path, $uuid, "armv6"); } else { die "Can't understand the output from otool ($TEST_uuid)"; } }






5)issue:atos can not查找符号



此处Greg脚本更改无效,


5) issue: "atos can not find symbols"

here Gregs script changes didn't work,


  • 似乎在中的< $ ph> 在代码突出显示中丢失了rindex()。

  • atos无法加载符号未传递到脚本中 - 因此检查无效。

  • < $ ph& rindex(检查读取第一行...所以一帧丢失,如果它是成功的
    作为一个 我只是伪造一个框架与adreass 1 ...在atos检查期间使用。

  • it seems that <$ph> in rindex( got lost in the code highlighting.
  • the "atos cannot load symbols" wasn't beeing passed into the script - so the check wouldn't work
  • the <$ph> in rindex( check reads the first line ... so one frame gets lost in case it was successfull. As a "hack" i simply faked a frame with adreass 1... which is "used" during the atos check.

这是我在 sub symbolize_frames 中改变的:

replace:

my $cmd = "$atos -arch $arch -o '$escapedSymbol' @{[ keys %$frames ]} | ";

my $cmd = "$atos -arch $arch -o '$escapedSymbol' 1 @{[ keys %$frames ]}  2>&1 | ";

replace:

open my($ph),$cmd or die $!;

by:

open my($ph),$cmd or die $!;
if (rindex(<$ph>, "atos cannot load symbols") != -1 && $arch eq "armv7") {
    my $arch = "armv6"; my $cmd = "$atos -arch $arch -o '$escapedSymbol' @{[ keys %$frames ]}  2>&1 | ";
    print STDERR "Running $cmd\n" if $opt{v};
    open $ph,$cmd or die $!;
}






注意:使用此更改脚本运行正常 - 修复可能不是很优雅,但我不能流利的perl :) ...


Note: with this changes the script runs fine for me - the "fixes" are probably not very elegant but i'm not fluent in perl :) ...

这篇关于iPhone SDK 3.0和符号化不赶紧?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆