[m-dev.] for review: workaround for the large term problem in the debugger

Zoltan Somogyi zs at cs.mu.OZ.AU
Sun Jun 14 14:58:20 AEST 1998


Erwan wrote:
> Well, I have implemented the same sort of things in
> mercury_trace_external.c. (variable name retrieval, printing just one
> argument).
> Maybe we should rather put common stuff in mercury_trace_util.c and
> write procedures in such way that we can both use it (read "you should
> write procedures in such a way that I can use it" :-)).

I agree with this in general. I have therefore moved the function
MR_trace_materialize_typeinfos into mercury_trace_util.c.

> For example, MR_trace_list_vars should produce a list of string of the
> name of the variable instead of directly printing them (so I can send
> the list to the Opium process). Of course, I can also duplicate your
> code and adapt it to my own need , but I'am not sure that's the way to
> go.

However, in this case, the common code is only the trivial control structure
of a loop, and the differences in the loop body wrt memory management
(none for the internal debugger, alloc and later free of the list
for the external debugger) are reasonably significant.

Zoltan.



More information about the developers mailing list