ios Atos 无法从已归档应用程序的 dSYM 中获取符号

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7675863/
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-08-30 21:45:55  来源:igfitidea点击:

Atos cannot get symbols from dSYM of archived application

iosxcodecrashsymbolicatecrash

提问by Jason

I have a crash report from BugSense, so I have information on the memory location of crashes but they are not symbolicated. Also Bug Sense does not send traditional crash reports but still gives me a bugtrace. So I am trying to use Atos to get the exact location of my crashes. I have archived the app in XCode 4 and used that version to submit to the app store, so I have a dSYM file. I have run the following code:

我有来自BugSense的崩溃报告,所以我有关于崩溃的内存位置的信息,但它们没有被符号化。此外,Bug Sense 不会发送传统的崩溃报告,但仍会给我一个错误跟踪。所以我试图使用 Atos 来获取崩溃的确切位置。我已经在 XCode 4 中存档了该应用程序并使用该版本提交到应用程序商店,所以我有一个 dSYM 文件。我已经运行了以下代码:

atos -arch armv7 -o MyApp.app.dSYM 0x001057e9

However, instead of getting the proper output, I am receiving an error:

但是,我没有得到正确的输出,而是收到一个错误:

atos cannot load symbols for the file MyApp.app.dSYM for architecture armv7

Any suggestions as to why this might be happening? I am not stripping debug symbols from the app.

关于为什么会发生这种情况的任何建议?我没有从应用程序中剥离调试符号。

回答by Jason

To properly get symbols from your archived app's dSYM file and get useful information from your BugSense crash reports (or any other crash reports for that matter):

要从存档应用的 dSYM 文件中正确获取符号并从 BugSense 崩溃报告(或任何其他与此相关的崩溃报告)中获取有用信息:

  1. Copy the stack trace from BugSense into TextEdit or any other text editor. Make sure to use the "clipboard" icon, rather than simply copying the text. Otherwise you will not get the actual memory locations of the stack trace, which are necessary to look up the references using atosand symbolicate your stack trace.
  2. Open XCode and go to the Organizer
  3. Find your archive and right-click it, go to open it in the finder.
  4. Navigate to the directory of the archive, usually ~/Library/Developer/XCode/Archives/YYYY-MM-DD/
  5. Go into the specific archive, and then the dSYMsfolder
  6. You will see the file MyApp.app.dSYMand you may think, this is the file that I should run atosagainst! This is incorrect. It is actually another package!cdinto this package, into the folder: MyApp.app.dSYM/Contents/Resources/DWARFand you will find another file simply called MyApp. This is the actual dSYM file.
  7. Run atos -arch armv7 -o MyApp 0x0000000(or whatever the memory address is) to find the location of your error, or simply atos -arch armv7 -o MyAppto enter interactive mode.
  1. 将堆栈跟踪从 BugSense 复制到 TextEdit 或任何其他文本编辑器。确保使用“剪贴板”图标,而不是简单地复制文本。否则,您将无法获得堆栈跟踪的实际内存位置,这是使用atos堆栈跟踪查找引用和符号化堆栈跟踪所必需的。
  2. 打开 XCode 并转到 Organizer
  3. 找到您的存档并右键单击它,然后在查找器中打开它。
  4. 导航到存档目录,通常 ~/Library/Developer/XCode/Archives/YYYY-MM-DD/
  5. 进入特定的存档,然后进入dSYMs文件夹
  6. 你会看到这个文件MyApp.app.dSYM,你可能会想,这是我应该运行的文件atos!这是不正确的。它实际上是另一个包!cd进入这个包,进入文件夹:MyApp.app.dSYM/Contents/Resources/DWARF你会发现另一个名为MyApp. 这是实际的 dSYM 文件。
  7. 运行atos -arch armv7 -o MyApp 0x0000000(或任何内存地址)以找到错误的位置,或者只是atos -arch armv7 -o MyApp进入交互模式。

回答by Greg Hawk

You have to get the right address. You can use the solution above but you must use hex math to get the right memory address. slide + stack address - load address.

你必须得到正确的地址。您可以使用上面的解决方案,但您必须使用十六进制数学来获得正确的内存地址。幻灯片 + 堆栈地址 - 加载地址。