Click to See Complete Forum and Search --> : segmentation fault in program - cant find the core file


nad88
01-20-2003, 05:41 PM
I'm working on learning C and I'm doing an excercise in a book to demonstrate debugging and the gdb tool. There is a sample program that is supposed to cause a segmentation fault and leave you with a core dump to examine. everything goes as normal but i cant find the core core. I am using mandrake 8.2, gcc 2.9.6, gdb 5.1.1.

the exercise in the book looks like this:
$ gcc -g -D_GNU_SOURCE 01LST01.c -o wipe_out
$./wipe_out
Segmentation fault (core dumped)
$

when I run it it looks like this:
$./wipe_out
Segmentation fault
$

bwkaz
01-20-2003, 08:25 PM
It's probably the userlimit on core files set to zero. I know Mandrake 8.1 set that to 0; I'm not sure about 8.2, but I'd guess it does the same.

Try a ulimit -a to see the current core file limit, and use ulimit -c unlimited to set it to unlimited.