【发布时间】:2018-05-24 14:04:20
【问题描述】:
我收到了一份来自 Apple 的崩溃报告,并按照以下说明来表示它:How to symbolicate crash report from Apple received in .txt format not .crash format
不幸的是,我在执行第 7 步时看到了错误(“./symbolicatecrash ...”),但没有找到解决这些问题的 SO 问题:
xcodebuild: error: SDK "xxxos" cannot be located.
xcrun: error: unable to find utility "otool", not a developer tool or in PATH
## Warning: can't find tool named 'otool' in the xxxos SDK, falling back to searching the iOS SDK
xcodebuild: error: SDK "xxxos" cannot be located.
xcrun: error: unable to find utility "atos", not a developer tool or in PATH
## Warning: can't find tool named 'atos' in the xxxos SDK, falling back to searching the iOS SDK
xcodebuild: error: SDK "xxxos" cannot be located.
xcrun: error: unable to find utility "symbols", not a developer tool or in PATH
## Warning: can't find tool named 'symbols' in the xxxos SDK, falling back to searching the iOS SDK
xcodebuild: error: SDK "xxxos" cannot be located.
xcrun: error: unable to find utility "size", not a developer tool or in PATH
## Warning: can't find tool named 'size' in the xxxos SDK, falling back to searching the iOS SDK
No symbolic information found
注意事项:
- 我正在运行 Xcode 9.2
- 我还尝试将 otool、atos、symbol 和 size 工具从 /usr/bin 复制到同一目录,但仍然出现相同的错误
- 我可以直接从命令行成功运行所有这些工具
- 我怀疑问题出在 symbolicatecrash 函数“parse_SDKGuess”上,但我真的不能再进一步了...
知道发生了什么以及如何解决它吗?谢谢!
在 symbolicatecrash 脚本中添加了 parse_SDKGuess 函数以供参考:
sub parse_SDKGuess {
my ($log_ref) = @_;
# It turns out that most SDKs are named "lowercased(HardwareModelWithoutNumbers) + os",
# so attempt to form a valid SDK name from that. Any code that uses this must NOT rely
# on this guess being accurate and should fallback to whatever logic makes sense for the situation
my $model = parse_HardwareModel($log_ref);
$model or return undef;
$model =~ /(\D+)\d/;
$1 or return undef;
my $sdk = lc($1) . "os";
if($sdk eq "ipodos" || $sdk eq "ipados") {
$sdk = "iphoneos";
}
if ( $sdk =~ /mac/) {
$sdk = "macosx";
}
return $sdk;
}
似乎“lc($1)”的计算结果为“xxx”...
【问题讨论】:
-
你认为“xxxos”是什么?我从来没有听说过。
-
@matt,我在上面的问题中添加了 parse_SDKGuess 函数。谢谢。
-
好吧,如果您知道它在 ios 上,您可以将所有这些逻辑替换为:
return "iphoneos"; -
@GradyPlayer 谢谢,这让这些错误消失了,但我仍然得到“没有找到符号信息”,我确信这是一个完全不同的问题,但也许是我在第一名...
-
@GradyPlayer “未找到符号信息”也可能是因为我正在使用多个框架,并且每个框架在 dSYMs 文件夹中都有一个 .dSYM 文件。 (我从未见过的所有说明都可能出现多个 dSYM。)我将它们全部复制到同一个文件夹中。还有什么我应该做的吗?