On Mon, 5 Jun 2000, Dilog Mail wrote:

> Does anyone know how to persuade a recalcitrant C or C++ programme to
> terminate with a civilised stacktrace instead of a laconic "Segment
> violation"?

just a "sheelat tam" - what is wrong with using core files to read the
program's stack (and variables) after it terminates? you just need to make
sure that core file size for your program is not too limited, and that
your program's current directory is writeable by the user running your
process.

another "strange" option, taken from greg lindhal's reply to a similar
question (as found by searcihng dejanews...) : catch the signal, and then
invoke gdb (in batch mode) to attach to your process and dump its stack
trace into a file. see gdb's '-batch' and '-x' command line options. note,
however, that invoking gdb from inside a signal handler could fail...

guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to