Snow Leopard 是否将核心转储放在特殊的地方?

发布于 2024-08-22 20:48:00 字数 195 浏览 4 评论 0原文

我正在尝试调试我正在处理的应用程序上的段错误(当然可以在Linux上工作,所以我不能使用它作为调试核心转储的后备)。无论如何,我设置了“ulimit -c unlimited”,雪豹报告“分段错误(核心转储)”,但可惜没有找到核心文件。 Snow Leopard 是否将它们放在特殊的地方,或者我需要启用其他选项吗?令人惊讶的是,当我用谷歌搜索这个时,几乎没有返回......

I'm trying to debug a segfault on an application I'm working on (works on linux of course, so I can't use that as my fallback for debugging core dumps). Anyhow, I've set "ulimit -c unlimited" and snow leopard reports "Segmentation fault (core dumped)" but alas there is no core file to be found. Does Snow Leopard put them somewhere special or is there some other option I need to enable? Surprisingly little returned when I google this...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

清风疏影 2024-08-29 20:48:00

您需要配置 launchd 以便它实际写出核心转储。您可以在此 Apple 技术说明中找到相关说明。

基本上,您需要通过添加以下行来启用核心转储:

limit core unlimited

到您的 /etc/launchd.conf 文件,如有必要,创建它,然后重新启动。

调用:来为单个终端会话启用核心转储

ulimit -c unlimited

您还可以通过在启动命令行应用程序之前

。您可以在 /cores 中找到核心转储。请小心,因为核心转储可能很大,并且如果您不定期清理 /cores 目录,很容易填满您的驱动器。

You need to configure launchd so that it actually writes out the core dumps. You can find instructions for doing so in this Apple TechNote.

Basically, you need to enable Core Dumps by adding the line:

limit core unlimited

to your /etc/launchd.conf file, creating it if necessary, and then restarting.

You can also enable the core dump for a single terminal session by calling:

ulimit -c unlimited

before you launch your command-line app.

You can find the core dumps in /cores. Be careful, as core dumps can be large and can easily fill up your drive if you don't clean out the /cores directory on a regular basis.

迷鸟归林 2024-08-29 20:48:00

这只是一个疯狂的猜测,但是您检查过 /Library/Logs/DiagnosticReports/ 吗?

This is just a wild guess, but did you check /Library/Logs/DiagnosticReports/?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文