Forcing C program to core dump
Garrett Cooper
youshi10 at u.washington.edu
Wed Dec 6 14:08:15 PST 2006
Niclas Zeising wrote:
> 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
Wow. I got a lot of interesting ways to kill and force a coredump.
Haha... Not quite what I had in mind, but I guess that's what I get for
improperly wording the question.
Thank you all, the information I've gotten recently is definitely
educational and it'll probably end up being useful later!
-Garrett
More information about the freebsd-hackers
mailing list