stack dump

Erwan Jahier Erwan.Jahier at irisa.fr
Wed Sep 16 03:21:36 AEST 1998


Zoltan Somogyi wrote:
>
> > 1) would it be easy to implement a primitive that retrieve the list of
> > ancestors of the current predicate ? (I mean a primitive which go and
> > look in an existing stack) Is this information always available ?
> 
> runtime/mercury_stack_trace.c has the primitives for this.
> 
> This information is always available in debug grade. In other grades,
> the information may be missing for some modules, and when the stack trace
> hits a predicate from such a module, it must stop while still incomplete.

In order to be able to always print such stack traces, you needed to
make some information available in the memory more longer, rigth ?

I was wondering if you were able to estimate what was the cost of that:
- in terms of execution speed ?
- in terms of memory consumption ?
- in terms of developement efforts ? (Tyson ?-)

I am asking that because it possible to reconstruct that information
quite easily at the debugger level (10 lines of opium programming +
re-execute the program).


ps: Is this information (the one to be able to dump stack trace all the
time) used for something else ?
-- 
R1.



More information about the developers mailing list