[m-dev.] For review: Fix a bug in the external debugger

Fergus Henderson fjh at cs.mu.OZ.AU
Sat Feb 20 06:44:34 AEDT 1999


On 19-Feb-1999, Erwan Jahier <Erwan.Jahier at irisa.fr> wrote:
> [Fergus wrote:]
> | There should be a comment here similar to the one in mercury_trace_layout.c
> | explaining why those variables are filtered out.
> 
> The actual comment in mercury_trace_layout.c is:
> 
> /*
> ** get_type_and_value() and get_type() will succeed to retrieve "variables"
> ** that we do not want to send to the user; "variables" beginning with
> ** `ModuleInfo', or `HLDS' may occur when debugging the compiler and are too
> ** big to be displayed.  "Variables" beginning with `TypeInfo' denote the
> ** additional parameters introduced by compiler/polymorphism.m that we don't
> ** want to show neither.
> ** That's why we define filtered version of get_type_and_value() and get_type()
> ** that will fail to retrieve such variables.
> */
> 
> Shouldn't it be (as in mercury-trace_internal.c):
> 
> /*
> ** XXX The printing of type_infos is buggy at the moment
> ** due to the fake arity of the type private_builtin:typeinfo/1.
> */
> 
> ?
> Or do I miss something ?

Well, there are actually two reasons why we don't print out typeinfos.
The first reason is that the user probably doesn't want to see them.
The second reason is that if we tried, it would crash.
So both comments are valid.  But neither comment gives a complete
explanation.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "Binaries may die
WWW: <http://www.cs.mu.oz.au/~fjh>  |   but source code lives forever"
PGP: finger fjh at 128.250.37.3        |     -- leaked Microsoft memo.



More information about the developers mailing list