xcode 从哪里获取其他 iOS 版本的 iOS 系统符号

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18500104/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 03:44:37  来源:igfitidea点击:

Where to get iOS system symbols for other iOS versions

iosxcodedebug-symbols

提问by Arkaaito

Please note: I am asking for a place I can download the symbols, or for a conclusive answer that such a site is prohibited by Apple. The "duplicate" question is similar to the one I linked in my question: the only suggested answer is to get access to a physical device or to find another developer who has one.

请注意:我要的是一个可以下载符号的地方,或者是 Apple 禁止此类网站的最终答案。“重复”问题类似于我在问题中链接的问题:唯一建议的答案是访问物理设备或找到另一位拥有该设备的开发人员。

I've symbolicated a crashdump, but only the lines in my application code get symbolicated; system code does not. It looks something like this:

我已经符号化了故障转储,但只有我的应用程序代码中的行被符号化;系统代码没有。它看起来像这样:

Thread 0 Crashed:
0   libobjc.A.dylib                     0x39c195d0 0x39c16000 + 13776
1   QuartzCore                          0x33aefcad 0x33ade000 + 72877
2   QuartzCore                          0x33af3105 0x33ade000 + 86277
<snip>
13  UIKit                               0x33d862b9 0x33d2f000 + 357049
14  MyApp                               0x0005ef87 main (main.m:14)

...

Thread 7:
0   libsystem_kernel.dylib              0x3a101e30 0x3a101000 + 3632
1   CoreFoundation                      0x31ef82bb 0x31e61000 + 619195
2   CoreFoundation                      0x31ef7031 0x31e61000 + 614449
3   CoreFoundation                      0x31e6a23d 0x31e61000 + 37437
4   CoreFoundation                      0x31ec8c4b 0x31e61000 + 425035
5   MyApp                               0x0016f293 +[UA_ASIHTTPRequest runRequests] (UA_ASIHTTPRequest.m:4795)
6   Foundation                          0x3283b231 0x3278a000 + 725553
7   libsystem_c.dylib                   0x3a06b0e1 0x3a05a000 + 69857

I gather from thisquestion that this is because the crash came in from an iOS 6.1.4 device, and I do not have symbols for iOS 6.1.4 in my ~/Library/Developer/Xcode/iOS DeviceSupport folder.

我从这个问题中得知,这是因为崩溃来自 iOS 6.1.4 设备,而我的 ~/Library/Developer/Xcode/iOS DeviceSupport 文件夹中没有 iOS 6.1.4 的符号。

Unfortunately, iOS 6.1.4 is an iPhone 5-only release, and I don't have physical access to an iPhone 5 which I can update to 6.1.4, so getting the symbols off the device is out. Is there anyplaceI could download the symbols for different iOS versions (without the devices that run those versions), or are these considered Apple confidential?

不幸的是,iOS 6.1.4 是仅适用于 iPhone 5 的版本,我无法物理访问可以更新到 6.1.4 的 iPhone 5,因此无法从设备上移除符号。有什么地方可以下载不同 iOS 版本的符号(没有运行这些版本的设备),或者这些是否被视为 Apple 机密?

回答by zuik

I've collected most of system symbols from real devices (from secondhand moblie market), iOS firewares and Xcode's iOS SDKs.

我已经从真实设备(来自二手移动市场)、iOS 防火墙和 Xcode 的 iOS SDK 中收集了大部分系统符号。

You can download the version you need here:

你可以在这里下载你需要的版本:

iOS system symbol file(7.0-9.2)

iOS系统符号文件(7.0-9.2)

iOS system symbol file(9.2.1-10.2)

iOS系统符号文件(9.2.1-10.2)

Read iOS-System-Symbolsfor more details.If I get new symbol file, i will add it into the google drive sharing folder.You can follow the latest update from the github repository above.

阅读iOS-System-Symbols了解更多细节。如果我得到新的符号文件,我会将它添加到谷歌驱动器共享文件夹中。您可以从上面的 github 存储库中获取最新更新。

How to use

如何使用

  1. When you need to symbolicate a crash report, check the Code Typeand OS Versionsection. Such as:
  1. 当您需要符号化崩溃报告时,请检查Code TypeOS Version部分。如:

Code Type: ARM-64

Code Type: ARM-64

OS Version: iOS 10.2 (14C82)

OS Version: iOS 10.2 (14C82)

That means you need arm64version symbols of 10.2 (14C82)system.

这意味着您需要系统的arm64版本符号10.2 (14C82)

  1. Find the package in my sharing folder and extract it to ~/Library/Developer/Xcode/iOS DeviceSupport. (Check the file's name and path, it should be~/Library/Developer/Xcode/iOS DeviceSupport/10.2 (14C82)/Symbols).

  2. Use Xcode'ssymbolicatecrashtool to symbolicate your crash report. This tool will search system symbols in theiOS DeviceSupportpath automatically.

  1. 在我的共享文件夹中找到该包并将其解压缩到~/Library/Developer/Xcode/iOS DeviceSupport. (检查文件的名称和路径,应该是~/Library/Developer/Xcode/iOS DeviceSupport/10.2 (14C82)/Symbols)。

  2. 使用 Xcode 的symbolicatecrash工具来表示您的崩溃报告。此工具将iOS DeviceSupport自动搜索路径中的系统符号。

Symbols list

符号列表

There are 50 versions from 7.0 (11A465)to 10.2 (14C92).(if you count OS version with CPU architecture, it's 85. I've got 76 of them).

7.0 (11A465)到有 50 个版本10.2 (14C92)。(如果算上带有 CPU 架构的操作系统版本,则为 85。我有 76 个)。

Here is the list of symbols from 7.0to10.2, with their CPU architecture version I've got.

这是从7.0to的符号列表10.2,以及我得到的它们的 CPU 架构版本。

|    OS Version     | collected CPU version |
|-------------------|---------------------- |
|   10.2 (14C92)    |   arm64,armv7s        |
|   10.1.1 (14B150) |   arm64,armv7s        |
|   10.1.1 (14B100) |   arm64,armv7s        |
|   10.1 (14B72c)   |   arm64,armv7s        |
|   10.1 (14B72)    |   arm64,armv7s        |
|   10.0.3 (14A551) |   arm64,armv7s        |
|   10.0.2 (14A456) |   arm64,armv7s        |
|   10.0.1 (14A403) |   arm64,armv7s        |
|   10.0(14A346)    |   none                |
|   9.3.5 (13G36)   |   arm64,armv7s,armv7  |
|   9.3.4 (13G35)   |   arm64,armv7s,armv7  |
|   9.3.3 (13G34)   |   arm64,armv7s,armv7  |
|   9.3.2(13F72)    |   none                |
|   9.3.2 (13F69)   |   arm64,armv7s,armv7  |
|   9.3.1 (13E238)  |   arm64,armv7s,armv7  |
|   9.3(13E237)     |   armv7s,armv7        |
|   9.3(13E236)     |   armv7               |
|   9.3(13E234)     |   none                |
|   9.3 (13E233)    |   arm64,armv7s,armv7  |
|   9.2.1 (13D20)   |   arm64,armv7s        |
|   9.2.1 (13D15)   |   arm64,armv7s,armv7  |
|   9.2 (13C75)     |   arm64,armv7s,armv7  |
|   9.1 (13B143)    |   arm64,armv7s,armv7  |
|   9.0.2(13A452)   |   arm64,armv7s,armv7  |
|   9.0.1(13A404)   |   arm64,armv7s,armv7  |
|   9.0 (13A344)    |   arm64,armv7s,armv7  |
|   8.4.1 (12H321)  |   arm64,armv7s,armv7  |
|   8.4 (12H143)    |   arm64,armv7s,armv7  |
|   8.3 (12F70)     |   arm64,armv7s,armv7  |
|   8.3 (12F69)     |   arm64,armv7s,armv7  |
|   8.2 (12D508)    |   arm64,armv7s,armv7  |
|   8.1.3 (12B466)  |   arm64,armv7s,armv7  |
|   8.1.2 (12B440)  |   arm64,armv7s,armv7  |
|   8.1.1 (12B436)  |   arm64,armv7s        |
|   8.1.1 (12B435)  |   armv7s,armv7        |
|   8.1 (12B411)    |   arm64,armv7s,armv7  |
|   8.1 (12B410)    |   arm64,armv7s,armv7  |
|   8.0.2 (12A405)  |   arm64,armv7s,armv7  |
|   8.0.1(12A402)   |   armv7s,armv7        |
|   8.0 (12A366)    |   arm64,armv7s        |
|   8.0 (12A365)    |   arm64,armv7s,armv7  |
|   7.1.2 (11D257)  |   armv7s,armv7        |
|   7.1.1 (11D201)  |   arm64,armv7s,armv7  |
|   7.1 (11D167)    |   arm64,armv7s,armv7  |
|   7.0.6 (11B651)  |   arm64,armv7s,armv7  |
|   7.0.4 (11B554a) |   arm64,armv7s,armv7  |
|   7.0.3 (11B511)  |   arm64,armv7s,armv7  |
|   7.0.2(11A501)   |   armv7s,armv7        |
|   7.0.1(11A470a)  |   armv7s              |
|   7.0(11A465)     |   arm64,armv7s,armv7  |

Missing symbols

缺少符号

I still miss these CPU's symbols, if you have any of them, please share:

我仍然想念这些 CPU 的符号,如果你有任何符号,请分享

| missed OS Version |   missed CPU Version  |   description
|-------------------|-----------------------|-----------------
|  10.0(14A346)     |  arm64                |  iPhone 7 and 7 Plus-only, default OS when leave factory 
|  9.3.2(13F72)     |  arm64                |  iPad Pro 9.7-inch-only, fix bricked problem
|  9.3(13E237)      |  arm64                |  5s, iPad Air and iPad mini2 only, fix activation problem
|  9.3(13E234)      |  arm64                |  6s, 6s Plus and iPad Pro 9.7-inch only
|  8.1.1 (12B435)   |  arm64                |  5s, iPad Air and iPad mini2 only
|  8.0.1(12A402)    |  arm64                |  `8.0.1`was pulled soon after released.Because it has serious bugs 
|  7.1.2 (11D257)   |  arm64                |    
|  7.0.2(11A501)    |  arm64                |  
|  7.0.1(11A470a)   |  arm64                |  5s only  

How to check which CPU version the symbol file contains

如何检查符号文件包含哪个 CPU 版本

If you already have a system symbol file, and want to know which CPU version it contains, check files in the path like10.2 (14C92)/Symbols/System/Library/Caches/com.apple.dyld. There should be file nameddyld_shared_cache_arm64,dyld_shared_cache_armv7s,dyld_shared_cache_armv7.

如果您已经有一个系统符号文件,并且想知道它包含哪个 CPU 版本,请检查路径中的文件,例如10.2 (14C92)/Symbols/System/Library/Caches/com.apple.dyld. 应该有名为dyld_shared_cache_arm64, dyld_shared_cache_armv7s, 的文件dyld_shared_cache_armv7

If you miss one, that means you don't have that CPU version's symbols.

如果你错过了一个,那意味着你没有那个 CPU 版本的符号。

回答by Maxim Kholyavkin

I know only long hard way: download ipsw file and extract symbols from it with hackers tools. Maybe anyone can find way easier?

我知道只有很长的路要走:下载 ipsw 文件并使用黑客工具从中提取符号。也许任何人都可以找到更简单的方法?

upd: I have found solution simpler.

upd:我发现解决方案更简单

I tried to symbolify iOS 7.0.1 symbols, but unsucessfull (same reason as you have with iOS 6.1.4)

我试图符号化 iOS 7.0.1 符号,但未成功(与 iOS 6.1.4 的原因相同)

Next steps help me:

接下来的步骤可以帮助我:

  1. I edited .crashfile and change iOS 7.0.1 to iOS 7.0
  2. backup and delete everything from ~/Library/Developer/Xcode/iOS DeviceSupport
  3. run symbolicatecrash from Xcode5 (which contains iOS 7 symbols)
  1. 我编辑了.crash文件并将 iOS 7.0.1 更改为 iOS 7.0
  2. 备份并删除所有内容 ~/Library/Developer/Xcode/iOS DeviceSupport
  3. 从 Xcode5(包含 iOS 7 符号)运行symbolicatecrash

Ignoring some а these steps do unsuccesfull results for me.

忽略一些这些步骤对我来说是不成功的结果。

I hope it helps you.

我希望它能帮助你。

回答by Steven Kramer

You should be able to symlink the 6.1.something SDK that you have to 6.1.4, similar to my answer here (https://stackoverflow.com/a/19383685/473067). In this case, of course, the symlink should be in Xcode5.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs.

您应该能够将您拥有的 6.1.something SDK 符号链接到 6.1.4,类似于我在此处的回答(https://stackoverflow.com/a/19383685/473067)。在这种情况下,当然,符号链接应该在Xcode5.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs.

We routinely symbolicate crashes using SDK versions that are close enough, but we use our own symbolification script instead of the Xcode one, and the symbols don't always match, so YMMV.

我们通常使用足够接近的 SDK 版本来符号化崩溃,但我们使用我们自己的符号化脚本而不是 Xcode 脚本,并且符号并不总是匹配,所以 YMMV。