How to generate core dump file in Ubuntu [duplicate]
问题 This question already has answers here : How to generate a core dump in Linux on a segmentation fault? (12 answers) Closed 5 years ago . 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