You can always run gdb -c /path/to/corefile /path/to/program_that_crashed
. However, if program_that_crashed has no debug infos (i.e. was not compiled and linked with the -g
gcc/ld flag) the coredump is not that useful unless you're a hard-core debugging expert ;-)
Note that the generation of corefiles can be disabled (and it's very likely that it is disabled by default on most distros). See man ulimit
. Call ulimit -c
to see the limit of core files, "0" means disabled. Try ulimit -c unlimited
in this case. If a size limit is imposed the coredump will not exceed the limit size, thus maybe cutting off valuable information.
Also, the path where a coredump is generated depends on /proc/sys/kernel/core_pattern. Use cat /proc/sys/kernel/core_pattern
to query the current pattern. It's actually a path, and if it doesn't start with /
then the file will be generated in the current working directory of the process. And if cat /proc/sys/kernel/core_uses_pid
returns "1" then the coredump will have the file PID of the crashed process as file extension. You can also set both value, e.g. echo -n /tmp/core > /proc/sys/kernel/core_pattern
will force all coredumps to be generated in /tmp.