How can I get C programs to automatically generate stack dumps?


Here is how you get a C program automatically generate a stack dump
when they abend:

U_STACK_TRACE() is an undocumented function that resides in libcl. Set
up
the signal handling like this:

#include <signal.h>
extern void U_STACK_TRACE();
signal(SIGSEGV, U_STACK_TRACE);

[an error occurred while processing this directive]