core-file (gdb mode only)

Specify a core file as a target, or specify not to use a core file.

Syntax

core-file [filename]

Parameters

filename

filename of the target core file.

Description

This command specifies a core file as a target or tells the debugger not to use a core file. Specify the file name of the core file to use it as a target.

Core file debugging is not supported on Mac OS X*.

This command without a filename parameter tells the debugger not to use a core file.

When you specify a core file, this command is the same as target core.

The debugger uses the core file as the contents of memory. Core files usually contain only some of the address space of the process that generated them. The debugger accesses the executable for the rest.

Note iconNote

The debugger ignores the core file when your program is actually running under the debugger. So if you have been running your program and you want to debug a core file instead, you must kill the subprocess in which the program is running, by using the kill command.

Example

A debuggee is made before invoking the debugger.

$ make_core
Floating point exception (core dumped)
$ ls -l *core*
core.28671
$ idb

After the debugger starts, exec-file specifies the debuggee, make_core.

(idb)  exec-file make_core
Reading symbols from /site/c_code/make_core...done.
(idb)  core-file  core.28671
Reading symbols from /site/c_code/make_core...done.
Core file produced from executable make_core
Initial part of arglist: make_core
Thread terminated at PC 0x08048447 by signal SIGFPE
(idb)  where
#0  0x08048447 in main () at /site/c_code/make_core.c:14
(idb) 

See Also


Submit feedback on this help topic

Copyright © 2001-2011, Intel Corporation. All rights reserved.