Line numbers in stack traces

ke.han ke.han@REDACTED
Thu Aug 11 07:07:23 CEST 2005


Richard A. O'Keefe wrote:
> 
> This is a case where the lightweight approach I've repeatedly suggested,
> namely reporting
> 
>     {Module,Function_Name,Arity,Clause_Number},
>                                 ^^^^^^^^^^^^^
> 
> would probably give you 90% of what line numbers might have, at a fraction
> of the implementation effort.
> 
...

> (The one that generated the bad data.)  In Erlang terms, I would normally
> find more benefit in having the *arguments* of the functions in the stack
> trace than in having the line numbers.  With the arguments of the top
> function, since they cannot possibly have changed, and since function
> headers and guards cannot have side effects and cannot depend on anything
> that could be changed by a side effect, it is possible to "replay" clause
> selection and discover which clause the crash was in (and, more importantly,
> why that clause was selected).  So arguments can give you positions, but
> positions cannot give you arguments.
> 
> Of course keeping arguments creates a conflict between accurate debugging
> information and usable performance (garbage collection).  TANSTAAFL.
> 
> 


The above ideas sound dead on!!!  So when can we see a prototype? ;-)
How about linking this to Smalltalk style walkback windows and debugger? 
;-)
ok, thats asking a bit much for a first step...I'll be happy with better 
info on the console and adding links into the emacs mode to quickly get 
to the code (similar to compile errors, but with clause finding instead 
of line number finding, of course).

This has been a fruitful discussion.  How can these ideas get 
implemented and not drop the ball on this one?

thanks ke han




More information about the erlang-questions mailing list