xcode OS X 崩溃日志符号

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

OS X Crash Log Symbolication

xcodecrash-reportsxcode4.6symbolicate

提问by Mark Bernstein

I cannot symbolicate OS X (not iOS) crash logs from testers and users using XCode 4.6 . The crash logs cannot be dragged into the organizer, and the organizer does not show any crash logs from ~/Library/Logs/DiagnosticReports/, though some logs are in that directory.

我无法符号化来自使用 XCode 4.6 的测试人员和用户的 OS X(不是 iOS)崩溃日志。无法将崩溃日志拖入管理器,并且管理器不会显示来自 ~/Library/Logs/DiagnosticReports/ 的任何崩溃日志,尽管该目录中有一些日志。

Didier Malenfant commented on a previous thread XCode not importing OS X crash logthat

迪迪埃·马伦凡特在以前的线程评论 的XCode不是进口OS X崩溃日志

The bottom line is quite simple. As of now (Xcode 4.6), OS X crash logs cannot be imported into Xcode. Only iOS ones.

底线很简单。截至目前(Xcode 4.6),无法将 OS X 崩溃日志导入 Xcode。只有 iOS 的。

Is this the current state of affairs? It's hard to imagine that organizations are able to support new OS X software without effective ways to intepret crash reports.

这是目前的状况吗?很难想象,如果没有有效的方法来解释崩溃报告,组织能够支持新的 OS X 软件。

回答by w00t

If you have a stack trace; for example:

如果您有堆栈跟踪;例如:

0   com.your_app        0x00000001016191e0 0x1015fb000 + 123360
1   com.your_app        0x000000010161509d 0x1015fb000 + 106653
2   com.your_app        0x00000001016147b9 0x1015fb000 + 104377
3   com.your_app        0x000000010161df81 0x1015fb000 + 143233`

Try the following:

请尝试以下操作:

atos -o YOUR_APP.app.dSYM/Contents/Resources/DWARF/YOUR_APP -l 0x1015fb000 0x00000001016191e0 0x000000010161509d 0x00000001016147b9 0x000000010161df81`

回答by Parag Bafna

You can use GDB for Symbolication, Put your release build and your .dSYM file in the same directory open terminal

您可以使用 GDB 进行符号化,将您的发布版本和 .dSYM 文件放在同一目录中打开终端

$ cd directory
$ gdb MyApp.app
(gdb) info line *0x00085f3c  

or you can use atosas suggested by trojanfoe

或者你可以使用ATOS所建议trojanfoe

$cd directory
$atos -o MyApp.app/Contents/MacOS/MyApp
info 0x00085f3c

or

或者

$ cd directory
$ lldb MyApp.app
(lldb) image lookup -v --address 0x1ec4

回答by Lukas Neumann

We had the same problem with our app and I was symbolicating the crash reports manually line by line with atos.

我们的应用程序遇到了同样的问题,我正在用atos.

I now tweaked Apple's symbolicate script such that it works with Mac apps and crash reports from PLCrashReporter.

我现在调整了 Apple 的符号脚本,使其适用于 Mac 应用程序和来自 PLCrashReporter 的崩溃报告。

https://github.com/lksnmnn/Symbolicate-CrashReports

https://github.com/lksnmnn/Symbolicate-CrashReports

How to use it:

如何使用它:

Make sure you have all of the following files on your computer:

确保您的计算机上具有以下所有文件:

  1. The crash report: report.crash
  2. The dSYM file of your app: MyApp.dSYM
  3. The executable / app folder of your app: MyApp.app
  4. The improved symbolicate script: symbolicatecrash
  1. 崩溃报告:report.crash
  2. 您的应用程序的 dSYM 文件:MyApp.dSYM
  3. 您的应用程序的可执行文件 / app 文件夹:MyApp.app
  4. 改进的符号脚本:symbolicatecrash

Now go in the command line (Terminal) and do the following:

现在进入命令行(终端)并执行以下操作:

# set the developer directory
export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer"

# Now run the script
/Path/To/symbolicatecrash /Path/To/report.crash > /Path/To/readable_report.crash

# Use -v for verbose logging.

The script will find your dSYM and your executable and symbolicates as much as it cans. You will now find your symbolicated report in the stated output file readable_report.crash

该脚本将找到您的 dSYM 和您的可执行文件,并尽可能多地进行符号化。您现在将在规定的输出文件readable_report.crash 中找到您的符号化报告

Build settings:

构建设置:

For proper reports and symbols, set your build settings to this:

要获得正确的报告和符号,请将构建设置设置为:

Strip Debug Symbols During Copy: Yes
Strip Style: All Symbols
Strip Linked Product: Yes

回答by Justin Eide

I've used MacSymbolicatorand Xsymbolicatein cases where I had a dsym and crash report file. They did the job for simply needs, though Xcode's built in crash reporting support has also gotten better, at least for apps sold in the App Store.

在我有 dsym 和崩溃报告文件的情况下,我使用了MacSymbolicatorXsymbolicate。他们只是为了简单的需要完成了这项工作,尽管 Xcode 的内置崩溃报告支持也变得更好,至少对于在 App Store 中销售的应用程序而言。