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

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Feb 22 18:27:36 AEDT 1999


On 22-Feb-1999, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> On 20-Feb-1999, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > 
> > 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.
> 
> Why would it crash?

According to the comment in runtime/mercury_layout_util.c:

	/*
	** XXX The printing of type_infos is buggy at the moment
	** due to the fake arity of private_builtin:typeinfo/1.
	**

> The accurate garbage collector debugging code successfully prints out
> typeinfos.  There were some bugs I fixed to get this working, but
> I don't think they were related to the printing of the typeinfos, just
> the retrieval.
> Is there something I'm missing?

io__write has some code to handle private_builtin:type_info
as a special case.

However, std_util__deconstruct does not, and nor does browse__print
(which is what the internal debugger uses, rather than io__write).

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