Core files
Core files capture the state of a failing program at the point that it terminates. You don't even have to be in the room with a debugger when the bug manifests itself. So when you see Segmentation fault (core dumped), don't shrug; investigate the core file and extract the goldmine of information in there.
The first observation is that core files are not created by default, but only when the core file resource limit for the process is non-zero. You can change it for the current shell using ulimit -c. To remove all limits on the size of core files, type the following:
$ ulimit -c unlimited
By default, the core file is named core and is placed in the current working directory of the process, which is the one pointed to by /proc/<PID>/cwd ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access