【发布时间】:2018-08-23 21:57:03
【问题描述】:
我一直尝试在 Xcode 9 中使用 symbolicatecrash 来表示用户提供的 OS X 崩溃日志。根据我的研究,它的用法似乎很简单。但是,我无法克服这个错误:
Unsupported crash log version: 12 at .../symbolicatecrash line 619
当我检查日志文件时,我发现它确实是 Report Version 12。当我在 Xcode 中打开 symbolicatecrash 时,我发现有问题的代码:
if(! $is_spindump_report) {
if($report_version == 102 || $report_version == 103) { # Leopard GM
$pat = '
^\s* (\w+) \s* \- \s* (\w+) \s* (?# the range base and extent [1,2] )
(\+)? (?# the application may have a + in front of the name [3] )
(.+) (?# bundle name [4] )
\s+ .+ \(.+\) \s* (?# the versions--generally "??? [???]" )
\<?([[:xdigit:]]{32})?\>? (?# possible UUID [5] )
\s* (\/.*)\s*$ (?# first fwdslash to end we hope is path [6] )
';
%captures = ( 'base' => \$1, 'extent' => \$2, 'plus' => \$3,
'bundlename' => \$4, 'uuid' => \$5, 'path' => \$6);
}
elsif($report_version == 104 || $report_version == 105) { # Kirkwood
# 0x182155000 - 0x1824c6fff CoreFoundation arm64 <f0d21c6db8d83cf3a0c4712fd6e69a8e> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
$pat = '
^\s* (\w+) \s* \- \s* (\w+) \s* (?# the range base and extent [1,2] )
(\+)? (?# the application may have a + in front of the name [3] )
(.+) (?# bundle name [4] )
\s+ ('.$architectures.') \s+ (?# the image arch [5] )
\<?([[:xdigit:]]{32})?\>? (?# possible UUID [6] )
\s* (\/.*)\s*$ (?# first fwdslash to end we hope is path [7] )
';
%captures = ( 'base' => \$1, 'extent' => \$2, 'plus' => \$3,
'bundlename' => \$4, 'arch' => \$5, 'uuid' => \$6,
'path' => \$7);
}
else {
die "Unsupported crash log version: $report_version";
}
}
据我所知,OS X 崩溃日志目前是 12 版,而旧报告是 11、10、9 版……我不是 PERL 专家,但似乎使用这段代码,symbolicatecrash 会从不工作。它似乎正在寻找报告版本 102、103、104 或 105。我找到了许多解释如何使用 symbolicatecrash 的教程/指南,因此它似乎对某些人有用。
任何人都可以帮助弄清楚发生了什么。我注意到该代码受版权保护 2008-2015,所以也许这是一个旧版本,但我在 Xcode 9.4.1 中找到了这个。或者,符号崩溃仅适用于 iOS 崩溃日志?
【问题讨论】: