This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Thread bound variable objects [was: Re: MI non-stop mode spec]


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]