Stack trace

2000-06-05 Thread Dilog Mail
Hello! Does anyone know how to persuade a recalcitrant C or C++ programme to terminate with a civilised stacktrace instead of a laconic "Segment violation"? The tasks in question are heavily forked or threaded. Dear old printf() (or cout ) do help a lot, but we really have crawled out of the

Re: Stack trace

2000-06-05 Thread Moshe Zadka
On Mon, 5 Jun 2000, Dilog Mail wrote: Hello! Does anyone know how to persuade a recalcitrant C or C++ programme to terminate with a civilised stacktrace instead of a laconic "Segment violation"? C doesn't have enough information for stack traces in the runtime -- Moshe Zadka [EMAIL

Re: Stack trace

2000-06-05 Thread Alex Shnitman
s type "bt" to get the stack trace. -- Alex Shnitman| http://www.debian.org [EMAIL PROTECTED], [EMAIL PROTECTED] +--- http://alexsh.hectic.netUIN 188956PGP key on web page E1 F2 7B 6C A0 31 80 28 63 B8 02 BA 65 C7 8B B

Re: Stack trace

2000-06-05 Thread Ury Segal
to believe, but it IS possible to do a stack trace from within the program. I did it inside the Linux kernel itself. Doing it inside a user program is much easier. And stack trace is just the beginning. You can do breakpoints, watched, everything. There is only one big problem, which is finding the symbol table

Re: Stack trace

2000-06-05 Thread Dilog Mail
it is hard to believe, but it IS possible to do a stack trace from within the program. I did it inside the Linux kernel itself. Doing it inside a user program is much easier. And stack trace is just the beginning. You can do breakpoints, watched, everything. There is only one big prob

Re: Stack trace

2000-06-05 Thread guy keren
uestion (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 &