How to generate core dump file in Ubuntu [duplicate]

This question already has an answer here:

I would like to know how to generate a core dump file in Ubuntu. I am using Ubuntu 8.04.1 and gcc compiler 4.2.3. I have written a simple C program to generate a core dump. I have compiled the program as in -- gcc -g badpointer.c . When I run the program its gives segmentation fault but no core dump is generated. What additional things do i have to do to generate a core dump file ?

23
задан user496934 27 May 2011 в 12:28
поделиться