Boost logo

Boost :

From: Schalk_Cronje_at_[hidden]
Date: 2002-06-13 03:24:28


> > I lean towards (b) until I see some indication that (a) is really
> possible
> > for the popular platforms.

I think one really needs both (a) and (b).
(b) is good in that one can get a clear description as to the function name,
file etc. (assuming that info is added to the exception).
(a) is good when one tries to trace hard to find bugs. It can also be used
when replacing terminate() or in a signal handler to catch SEGV signals. It
can also be used to complement an exception being thrown, by showing the
stack at that point in time.

(a) and (b) are separate entities and must not be seen as one approach.

To complement (a) I have uploaded a file to
http://groups.yahoo.com/group/boost/files/StackTraces/ which contains Linux
and Solaris implementations. It separates the system-dependant part from
display. The system part is a function stacktrace() that calls back to a
display functor for each stack entry encountered. The example function that
I included only writes to an ostream, but functors to append to strings or
call back_inserters are easy to add. These files are meant to be a starting
point for discussing requirements for (a).

----------------------------------[ .signature ]---
Schalk W. Cronjé,
                     


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk