7;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 f
nic "Segment
> > > violation"?
>
> OK people... I know 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
ple... I know 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 proble
r it segfaults 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 6
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
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 s