Forcing C program to core dump

Garrett Cooper youshi10 at u.washington.edu
Wed Dec 6 11:43:31 PST 2006


Garrett Cooper wrote:
> Hello,
>    This may be obvious to some, but after some Googling (apparently 
> with the wrong search terms, perhaps) and reading the gcc/gdb 
> manpages, I can't seem to find out how to get a program to produce 
> core dumps.
>    So I was wondering, is there some simple means to produce core 
> dumps or a set of conditions that I need to adhere to in order to get 
> the OS to core dump the progrdam???
> Thanks,
> -Garrett
>
    Did a bit more poking around and determined how to do it. It wasn't 
core dumping because I didn't set the maximum limit for the coredump 
size to unlimited ("ulimit -c unlimited").
    Good page about this topic: 
<http://linuxfocus.berlios.de/English/July2004/article343.shtml>.
-Garrett


More information about the freebsd-hackers mailing list