My program is written in C++. compiled with gcc, using -g3 -O0 -ggdb flags. When it crashes, I want to open its core dump. Does it create core dump file, or I need to do something to enable core dump creation, in the program itself, or on computer where it is executed? Where this file is created, and what is its name?
You need to set ulimit -c
. If you have 0 for this parameter a coredump file is not created. So do this: ulimit -c unlimited
and check if everything is correct ulimit -a
. The coredump file is created when an application has done for example something inappropriate. The name of the file on my system is core.<process-pid-here>
.