Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Snow Leopard put core dumps somewhere special?

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...

like image 730
gct Avatar asked Feb 23 '10 17:02

gct


2 Answers

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.

like image 126
Rob Keniger Avatar answered Nov 15 '22 09:11

Rob Keniger


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

like image 44
oefe Avatar answered Nov 15 '22 09:11

oefe