[m-dev.] For review: handling one by one variable retrieval within the external debugger

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Jul 30 18:43:00 AEST 1998


On 29-Jul-1998, Erwan Jahier <Erwan.Jahier at irisa.fr> wrote:
> Fergus Henderson wrote:
> 
> > > --- mercury_trace_external.c.save     Wed Jul 29 15:10:43 1998
> > > +++ mercury_trace_external.c  Wed Jul 29 16:05:59 1998
> > > @@ -612,16 +619,12 @@
> > >       restore_transient_registers();
> > >       incr_hp(univ, 2);
> > >
> > > -     if ((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))
> > > +
> > > +     if (MR_trace_get_type_and_value_filtered(var, name, &type_info,
> > > +                                                  &value))
> > 
> > I think there should be a `!' there.
> 
> I don't think so.

In that case, the meaning of the return value from
MR_trace_get_type_and_value_filtered must be the opposite of
that for MR_trace_get_type_and_value, since in the old code above
it had a `!'.  I thought you agreed it would be better to make
the meanings of the return values of these two function the same?

> > > +/*
> > > +** "variables" representing the saved values of succip, hp etc,
> > > +** which are the "variables" for which get_type_and_value
> > > +** fails, are not of interest to the trace analyzer.
> > > +** MR_trace_get_type_and_value_filtered() and MR_trace_get_type_filtered()
> > > +** will succeed for theses variables.
> > 
> > s/succeed/fail/
> 
> ah yes. 
> but the same way MR_trace_get_type_and_value should succeed for these
> variables and the zoltan's comment I've moved is wrong too. right ?

Uh, I'm not sure -- I don't know which comment you mean.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the developers mailing list