【问题标题】:Building libunwind for Mac为 Mac 构建 libunwind
【发布时间】:2015-01-08 14:24:21
【问题描述】:

我正在尝试在 Mac 上为 iOS 和 Mac 构建 libunwind,我能够解决一些编译问题。

在 Mac 上构建

我使用

配置了项目
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"

并从 google 的 breakpad 项目中复制了 elf.h

https://google-breakpad.googlecode.com/svn-history/r1017/trunk/src/common/android/include/elf.h

我现在收到以下错误:

/usr/include/elf.h:58:15: fatal error: 'elf.h' file not found
#include_next <elf.h>

任何人都可以帮我解决这个问题或者还有其他一些构建 libunwind 的程序吗?

我还想知道是否需要做其他事情来为 iOS 构建 libunwind。

【问题讨论】:

  • 为什么不使用内置的backtrace / backtrace_symbols
  • 嗨,史蒂文,感谢您抽出时间来帮助我。

标签: ios macos ios5 libunwind


【解决方案1】:

【讨论】:

  • 请注意,由于它目前使用私有函数_dyld_find_unwind_sections,如果您将其提交到App Store,它将被拒绝。
【解决方案2】:

我从 libunwind 开发者论坛得到了答复。

I don't think it will work. There's no OS X support in libunwind at the moment, 
and the platform is quite different.

There is a sort of a libunwind (which has little or nothing to do with this one) in the  
OS itself though. See http://opensource.apple.com/source/libunwind/

There's also some sort of symbolization library for post-processing. IIRC 
you more or less want to use the tools that ship with base OS or at least Xcode, 
otherwise you are up against writing quite a lot of tooling yourself.

简而言之,Mac OS X 不支持 libunwind。

【讨论】:

  • 你能发布论坛的链接吗?是关于 OSX(桌面)、iOS(移动)还是两者兼而有之?
  • 这两个平台都不可用。这是我在邮件线程上发布的问题的答案。 Apple 有自己的适用于 mac os 的 libunwind(Apple 的 libunwind)版本,但它不提供 libunwind 提供的大部分功能。
  • 你不能只是复制别人的文字;你应该至少给出归属。邮件列表是什么?你什么时候做的? comp.lib.unwind.devel 中帖子的作者是 Lassi Tuura; comments.gmane.org/gmane.comp.lib.unwind.devel/2199 2015 年 1 月 8 日
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2019-09-12
  • 2018-07-20
  • 2021-02-28
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多