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

Fergus Henderson fjh at cs.mu.OZ.AU
Sat Feb 20 01:50:13 AEDT 1999


On 19-Feb-1999, Erwan Jahier <Erwan.Jahier at irisa.fr> wrote:
> runtime/mercury_layout_util.c
> 	Filter out variables which names begin by "TypeClassInfo" in
> 	MR_get_type_and_value_filtered() (as it was already done in
> 	MR_get_type_filtered()).

The code to filter out variables whose names begin with "HLDS"
and "ModuleInfo" is obsolete, at least for the internal debugger,
so if that filtering is not needed for the external debugger then
you could delete that too while you're at it.

> +++ mercury_trace_external.c	1999/02/19 00:44:50
> @@ -709,6 +709,14 @@
>  	var_names_list = list_empty();
>  	for (i = var_count - 1; i >= 0; i--) {
>  		name = MR_name_if_present(vars, i);
> +		if ((strncmp(name, "TypeInfo", 8) == 0)
> +		    || (strncmp(name, "TypeClassInfo", 13) == 0)
> +		    || (strncmp(name, "ModuleInfo", 10) == 0)
> +		    || (strncmp(name, "HLDS", 4) == 0)
> +		    ) {
> +		  continue;
> +		}

There should be a comment here similar to the one in mercury_trace_layout.c
explaining why those variables are filtered out.

Apart from that, this change looks fine.

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