LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   not getting "core" file after segmentation faults (https://www.linuxquestions.org/questions/programming-9/not-getting-core-file-after-segmentation-faults-404288/)

hedpe 01-16-2006 10:38 PM

not getting "core" file after segmentation faults
 
Hi,

I am getting segmentation faults with my program, however I am getting no core dump file.

I compile like:
Code:

gcc  -c -g -Wall -Werror -DDEBUG -pthread caching.c
gcc -g -Wall -Werror -DDEBUG -pthread caching.o -o caching -lm

whenever I do "ulimit", it says "unlimited"

Any ideas?

Thanks!
George

eric.r.turner 01-17-2006 12:07 AM

Quote:

Originally Posted by hedpe
I am getting segmentation faults with my program, however I am getting no core dump file.

whenever I do "ulimit", it says "unlimited"

Any ideas?

Ulimit restricts more than just core file size. If you just type "ulimit" it gives you the maximum allowed size of files created by the shell. What happens when you type "ulimit -c"? I'm guessing it will say "0". ;) What you should do is "ulimit -c unlimited".

Cheers.

kshkid 01-17-2006 08:10 AM

Quote:

Originally Posted by hedpe
Hi,

I am getting segmentation faults with my program, however I am getting no core dump file.

I compile like:
Code:

gcc  -c -g -Wall -Werror -DDEBUG -pthread caching.c
gcc -g -Wall -Werror -DDEBUG -pthread caching.o -o caching -lm

whenever I do "ulimit", it says "unlimited"

Any ideas?

Thanks!
George

dumping binary image of the executable as a core file depends upon the default action of the signal the program had received.


All times are GMT -5. The time now is 04:50 PM.