O'Reilly logo

Advanced Mac OS X Programming: The Big Nerd Ranch Guide by Mark Dalrymple

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

For the More Curious: Core Files

Core files are a Unix-ism where a program that has crashed (usually by trying to read or write into memory it does not have access to) will write its entire address space to disk. You can then poke around this core file with gdb and see what was happening when the program crashed, kind of like a software autopsy.

By default on Mac OS X, core files are not created when your program crashes. Core files take a long time to write on OS X, and, on machines with less-than-stellar disk throughput, it can hose your machine for a fair number of seconds while the core file is being written. So you will not get core files unless you ask for them.

Example 8.2 is a program that can generate errors that can drop core files: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required