for review: stack dumps.

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Mar 4 15:28:17 AEDT 1998


On 04-Mar-1998, Tyson Dowd <trd at stimpy.cs.mu.oz.au> wrote:
> On 04-Mar-1998, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > On 03-Mar-1998, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> > > This adds stack traces (well, at the moment, just a "stack dump") to
> > > the library and runtime system.
> > > 
> > > You need to compile with MCFLAGS = --stack-trace and
> > > MGNUCFLAGS = -DMR_STACK_TRACE (or EXTRA_MCFLAGS and EXTRA_MGNUCFLAGS)
> > 
> > `mgnuc' should support a `--stack-trace' option (which would
> > just enable -DMR_STACK_TRACE).
> 
> This is fine.
> 
> > 
> > > to obtain an executable capable of displaying a stack dump.  This isn't
> > > intended to be the final mechanism -- probably a new grade or debugging
> > > grade would be the best solution.
> > 
> > Do you need to compile the whole thing (library, runtime, etc.)
> > with MR_STACK_TRACE defined, or does it work OK if only part
> > of the program is compiled with this flag?
> 
> For it to be useful, probably yes.  You could just let it print out
> information until it cannot go any further, but it wouldn't work very
> well in practice.  (You start to do a stack dump, and the algorithm
> immediately stops because there is no information available about
> error/1, or map__lookup, or whatever, and has to stop.  Not much of a
> stack dump).

Could it try dumping the stack from the bottom up rather than
from the top down?

-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list