Re: Programmatically generating the core dump

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi VM,

Your question is off-topic on this forum.

Anyway, trying to answer your question, what OS are you using?

On the many flora of Unix (that conform to SVID 3, POSIX, BSD 4.3, and/or ISO 9899), you can use the abort() function from C's <stdlib.h> / C++'s <cstdlib>.

I find it to be useful to instrument the throw action to cause the program to fork, have the child fork abort() so it creates a core dump, and the main fork continue with the throw action.

Even better if you can get the core file to be "core.$PID" instead of just "core".  :-)

For other OS's, I'm not sure.

HTH,
--Eljay


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux