根据给定的uuid定位dsym文件。
dsymForUUID的Python项目详细描述
LLDB debugger具有built-in support for symbolication,并且 特别是在MacOSX上,用于表示OSX和IOS崩溃日志。 不幸的是,出于某种原因,苹果最为人所知,为了发挥其功能, lldb.macosx.crashlog模块需要外部脚本来定位dSYM 崩溃日志中列出的uuid中的文件。这就是为什么 我无法默认实现这一点。
无论如何,这个包实际上只包含一个名为 dsymForUUID(模块crashlog需要的名称)。方法 脚本采用spotlight来定位dSYM文件;如果 查找dSYM,而不是单个.xcarchive,它将扫描 dSYM在存档文件中找到正确的文件,并且还将搜索 对于可执行文件。
这里的期望是您将拥有您的版本的xcode存档, 在这种情况下,它应该只是工作。
要在安装此脚本后使用lldb.macosx.crashlog,可以执行 以下内容:
(lldb) command script import lldb.macosx.crashlog "crashlog" and "save_crashlog" command installed, use the "--help" option for detailed help "malloc_info", "ptr_refs", "cstr_refs", and "objc_refs" commands have been installed, use the "--help" options on these commands for detailed help. (lldb) crashlog /tmp/crash.log
虽然我还没有测试这个,但是您也可以使用dsymForUUID 使用debugsymbols框架(mac os x的一部分)编写脚本 例如:
defaults write com.apple.DebugSymbols DBGShellCommands -string /usr/local/bin/dsymForUUID
有关更多信息,请参见LLDB page about debug symbols on Mac OS X。