*更新*
我已经重新安装了Snow Leopard,全新安装。完全清除了我现有的Leopard安装。同样的问题仍然存在。

我已尝试使用多个symbolicatecrash版本来解决崩溃报告中的符号。从Apple提供的版本,到发布在GitHub上的Alan's Quatermain的版本,最后是http://openradar.appspot.com/6438643

无论出于何种原因,我可以获得的最佳结果是使我自己的库中的符号得到解析。通常,这些数据足以使我指向正确的方向-有时情况并非如此。使用2.x,我可以毫无问题地获取代码符号+ Apple从每个线程的堆栈跟踪中提供了库。

最有可能是我的环境问题,我完全不怀疑Apple或Alan所做的工作。是的,我确定我藏匿的dSYM与生成崩溃报告的原因完全相同。

尽管'Foo'是我,从中获取符号非常好,但我需要查看堆栈中其他函数的符号才能真正理解我的报告。

注意:对于在iPhone OS 2.2.1上运行该应用程序而崩溃的设备,我没有问题可以获取所有符号。这是它出现的iPhone OS 3.0问题。

另外,在详细模式下运行symbolicatecrash时,有一些事情令我误解:

- 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运行崩溃报告后的示例:
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)

最佳答案

格雷格的建议对我不起作用,但有助于指出正确的方向
获取plcrashreporter日志(报告版本103)以再次用sdk 4.0进行符号化。

顺便说一句:这是在较新设备(armv7)上创建的报告中肯定会遇到的问题
因为符号表示报告版本103是armv6。

所以这就是我所做的...

1)

从最新的symbolicatecrash脚本(sdk 4.0)复制一份以进行更改。
注意:根据您使用的编辑器,您可能必须在编辑后设置可执行位。chmod 755 symbolicatecrash
2)问题:查找符号-不匹配

这是因为默认设置为armv6。

解决方法:在sub parse_images中设置默认体系结构 my $default_arch = 'armv7';
3)问题:“使用未初始化的值$ bundle ...”

解决方法:(hack:删除一些似乎不适用于103个报告的限制)

代替:

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

经过:
$app = $bundlename if (!defined $app);

4)问题:“无法理解otool的输出”

解决:Greg对sub matchesUUID的修复。

代替:
} 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)问题:“atos找不到符号”

在这里,Gregs脚本更改无效,
  • 似乎<$ph>中的rindex(在代码突出显示中丢失了。
  • 不会将“atos无法加载符号”传递给脚本-因此检查不起作用
  • <$ph>检查中的rindex(读取第一行...因此,如果成功,则丢失一帧。
    作为“hack”,我只是伪造了adreass 1 ...的框架,该框架在atos检查期间被“使用”。

  • 这就是我在sub symbolize_frames中所做的更改:

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

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

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

    经过:
    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 :) ...

    09-08 01:18