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]

Re: Which MI behavior is correct ?


 > >  >     - Are we supposed to recreate variables each time we enter the 
 > >  > function ?
 > >  >     - Is this efficient ?
 > > 
 > > Well the variables themselves are reallocated from the stack, so there's
 > > a chance that they're not the same variables.  At the moment, however
 > > GDB assumes that they are the same and you don't have to recreate them.
 > 
 > Aren't the variables associated with a particular frame ID?  I thought
 > we'd decided that it was the right thing to take them out of scope.

Maxim hadn't posted the test case when I replied.  Even now I'm not sure what
the chain of events are.  If the second instance is when f11 is called by f1,
then I agree it should be out of scope, and I think it always has been.  If it
refers to the second time f11 is called from main (and the transcript seems to
suggest this, although I've not looked too carefully) then GDB still considers
this to be in scope.



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