Forcing C program to core dump
Niclas Zeising
niclas.zeising at gmail.com
Wed Dec 6 11:56: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
Just kill it with the abort signal (SIGABRT) or some other signal that
makes the program dump core. Be aware though that if you are catching or
ignoring the signal, this won't work.
Regards!
//Niclas
--
More information about the freebsd-hackers
mailing list