Debugging Core Files

When the operating system encounters an unrecoverable error, for example, a segmentation violation (SEGV), the system creates a core dump file named core and places it in the current directory. The core file is not an executable file; it is a snapshot of the state of your process at the time the error occurred. It allows you to analyze the process at the point it crashed.

To enable core-file debugging, the debugger must be called with a core-file name at startup, such as:

> $ idb debuggee-name core-file-name

where debuggee-name is the name of the executable that created the core dump file, core-file-name is the name of the core dump file.

Core file debugging is not supported on OS X*.

  1. Select File > Open Core Dump... The Open Core Dump dialog box is opened.
  2. Enter the path of the executable file that created the core dump file into the Executable File field.
  3. Select the path of the core dump file associated with the executable file from the Core File drop-down list.
  4. Select View > Callstack. The Callstack window lists the functions in your program that were active when the dump occurred. By examining the values of a few variables along with the stack trace, you may be able to pinpoint the process state and the cause of the core dump.
  5. If you application is multithreaded, select View > Threads. The Threads window displays thread information. You can examine the stack trace for a particular thread or for all threads.

See Also


Submit feedback on this help topic