On Wednesday 06 December 2006 20:02 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???

Some signals default action is to cause the program to dump core, 
when they're delivered. You can see the list in the signal(3) man 
page. libc also provides the abort(3) function, which does what 
you want. The code is here:

  /usr/src/lib/libc/stdlib/abort.c


Cheers,
Vik
-- 
PGP Key: 0xE09DC8D8/6799 4011 EBDE 6412 05A1 090C DBDF 5887 E09D C8D8
Signed/encrypted mail welcome!

Attachment: pgpXtluuOBwyC.pgp
Description: PGP signature

Reply via email to