Ury Segal wrote:
>
> > Hi, Dilog!
> >
> > On Mon, Jun 05, 2000 at 01:04:16PM +0300, you wrote the following:
> >
> > > Does anyone know how to persuade a recalcitrant C or C++ programme to
> > > terminate with a civilised stacktrace instead of a laconic "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 beginning. You can do breakpoints, watched, everything.
>
> There is only one big problem, which is finding the symbol table and parse
> it. On linux you can make sure you compile with -g , and look at the
> /proc/<pid>/exe link to find the executable. If you omit the -g,
> you can do stack trace, but cannot see the parameters to the full,
> and cannot see local variables in a good format.
OK. I took a look at /proc/<pid> while it was running. It didn't look
too encouraging.
So what's next?
P.S. We got good coffee on 9th floor!
Daniel F.
>
> If you want to write an API for this for the global good, contact me,
> but be warned it is difficult and I have little time to help.
>
> =================================================================
> 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]
=================================================================
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]