Thread bound variable objects [was: Re: MI non-stop mode spec]
Nick Roberts
nickrob@snap.net.nz
Mon Mar 24 07:05:00 GMT 2008
> > + do_cleanups (old_cleanups);
> > +
> > return NULL;
> > }
>
> I think the use of cleanups above is wrong. You basically have:
>
> struct cleanups *old_cleanups = NULL;
> if (whatever)
> old_cleanups = ...
> do_cleanups (old_cleanups);
>
> so, if 'whatever' evaluates to false, all cleanups, including those set
> in parent, will be executed.
OK, it should be:
+ if (old_cleanups != NULL)
+ do_cleanups (old_cleanups);
> That's what we get for using a language that does not have exceptions
> and proper destructors. I'll fix this too.
I see now from the ChangeLog that you've committed your own change without
posting to the list first or explaining what it does.
My patch does two things:
1) It stops a variable object from being considered automatically out of
scope when the selected thread changes.
2) It associates a thread-id field with the variable object so that the
front end can organise the display of watch expressions accordingly.
AFAICS your patch does neither of these. Could you please say what it
does do?
--
Nick http://www.inet.net.nz/~nickrob
More information about the Gdb
mailing list