source line numbers

Erwan Jahier Erwan.Jahier at irisa.fr
Wed Jul 15 23:04:59 AEST 1998


Zoltan Somogyi wrote:

> The two causes I can think of are (1) mistake in my_mdb, so that
> MERCURY_OPTIONS gets either only -Di or both -De and -Di, and (2)
> using a version of mercury_trace.o that was compiled without
> -DMR_USE_EXTERNAL_DEBUGGER. 

The problem was (2).
Thanks Zoltan.

-----------------------------------------

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)

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


ps: if you find such line numbers usefull, I can do the change for the
internal debugger if you want.

-- 
R1.



More information about the developers mailing list