Snow Leopard 是否将核心转储放在特殊的地方?
我正在尝试调试我正在处理的应用程序上的段错误(当然可以在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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要配置
launchd
以便它实际写出核心转储。您可以在此 Apple 技术说明中找到相关说明。基本上,您需要通过添加以下行来启用核心转储:
到您的
/etc/launchd.conf
文件,如有必要,创建它,然后重新启动。调用:来为单个终端会话启用核心转储
您还可以通过在启动命令行应用程序之前
。您可以在
/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:
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:
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.这只是一个疯狂的猜测,但是您检查过
/Library/Logs/DiagnosticReports/
吗?This is just a wild guess, but did you check
/Library/Logs/DiagnosticReports/
?