Tip of the day

Thomas Lindgren thomasl_erlang@REDACTED
Wed Aug 18 11:37:01 CEST 2004


--- Vlad Dumitrescu <vlad_dumitrescu@REDACTED>
wrote:

> From: "Thomas Lindgren" <thomasl_erlang@REDACTED>
> 
> > Finally, it would also be useful if one could
> inspect
> > the stack too at exceptions, in particular to see
> the
> > source lines of the callers. Perhaps a generic
> "stack
> > walker" BIF would be handy?
> 
> A question popped out when reading this: can the
> stack really be traversed
> when we are using tail-call optimization?Or more
> precisely, would it be
> menaingful to traverse it in the presence of
> tail-calls?

Good question. The answers I have seen are basically
the following:

- ignore the problem, the result is still useful

- have VM settings not to optimize tail calls, use
them while debugging

- "dynamic deoptimization" as done in SELF, basically,
try to reconstruct the stack after the fact (good
luck)

"Ignoring the problem" is probably the easiest one to
get going :-)

Best,
Thomas


		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 



More information about the erlang-questions mailing list