[m-dev.] for review: new debugger command set (part 3 of 4)

Zoltan Somogyi zs at cs.mu.OZ.AU
Wed Oct 7 16:56:45 AEST 1998


> > @@ -61,6 +65,7 @@
> >  MR_agc_dump_stack_frames(MR_Internal *label, MemoryZone *heap_zone,
> >  	Word *stack_pointer, Word *current_frame)
> >  {
> > +	Word saved_regs[MAX_FAKE_REG];
> >  	int i, var_count;
> >  	const MR_Stack_Layout_Vars *vars;
> >  	Word *type_params, type_info, value;
> > @@ -87,8 +92,8 @@
> >  		var_count = layout->MR_sll_var_count;
> >  		vars = &(layout->MR_sll_var_info);
> >  
> > -		type_params = MR_trace_materialize_typeinfos_base(vars,
> > -			top_frame, stack_pointer, current_frame);
> > +		type_params = MR_materialize_typeinfos_base(vars,
> > +			NULL, stack_pointer, current_frame);
> 
> Isn't this the same thing?  Aren't the registers actually saved in
> this case.  Either the NULL should be "saved_regs" or you need an
> XXX here (or both).

I have added the following comment:

/*
** XXX For the top stack frame, we should pass a pointer to
** a filled-in saved_regs instead of NULL. For other stack
** frames, passing NULL is fine, since output arguments are
** not live yet for any call except the top one.
*/

> > +MR_get_type_and_value_filtered(const MR_Stack_Layout_Var *var, 
> > +	Word *saved_regs, const char *name, Word *type_info, Word *value)
> >  {
> >  	return ((strncmp(name, "TypeInfo", 8) != 0)
> >  	       && (strncmp(name, "ModuleInfo", 10) != 0)
> >  	       && (strncmp(name, "HLDS", 4) != 0)
> > -	       && MR_trace_get_type_and_value(var, NULL, type_info, value));
> > +	       && MR_get_type_and_value(var, saved_regs, NULL,
> > +			type_info, value));
> >  }
> 
> You probably want to filter on TypeClassInfo as well (I think we now
> generate TypeClassInfo variables instead of just TypeInfo).

The big change has nothing to do with type classes.

However, in another workspace I just got the debugger working with type
classes, and that did indeed require this change (not just here, but in some
other places as well).

Zoltan.



More information about the developers mailing list