[m-dev.] source line numbers

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Jul 15 23:59:35 AEST 1998


On 15-Jul-1998, Erwan Jahier <Erwan.Jahier at irisa.fr> wrote:
> While I'am here, one of the change I made is to add source line numbers
> in the trace (I retrieve line numbers via term__context_line/2 and pass
> it in argument of MR_trace). 
> 
> Line numbers I get are fine at internal ports (SWTC, DISJ, THEN, ELSE)
> but are not what is expected at other ports (CALL, EXIT, FAIL). For
> example, at CALL ports, I get the line number where the current
> predicate is defined whereas I'd prefer to have the number of line where
> the call is made.
> 
> 1) Do you think it make sense to provide such numbers (I mean, when thay
> are *correct*) ? 
> (currently in the trace, I only display line numbers in that case)

Yes, absolutely.

> 2) Do you see a way to get them rigth at all ports ?  

Well, we can put line numbers in the layout information generated
by stack_layout.m for continuation labels.   Then at interface ports,
you can use the line number in the layout information for the continuation
address, which is in the succip slot of the top stack frame.

We discussed this at a meeting here; I think Zoltan may have already
made a start towards implementing this?

Putting the line numbers in the proc layouts is probably also a more
efficient way of doing this than passing them directly to MR_trace().

-- 
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