This is the mail archive of the gdb-patches@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: [PATCH] MI: -var-update bug


 > >  > Randomisation isn't even the issue - I think that what you've got now
 > >  > is simply an accident, and varobjs associated with a particular frame
 > >  > should not become valid if a similar looking frame reappears later.
 > > 
 > > OK that shows I've misunderstood.  I thought it was looking for a frame
 > > to associate with it.
 > 
 > If a varobj is associated with a particular frame, and that frame
 > leaves the stack, I think we should report in_scope="false".  I'm
 > thinking that we should always report in_scope="false" after that
 > point... even if another frame that happens to have the same frame
 > ID appears later.

That's why I thought randomisation was an issue: without it presumably when
GDB stops at the same point (after restarting) for the second time, the frame
looks the same as it did the first time.  In this situation, the user might
want to keep the variable object.

Where the user creates a variable object, comes out of the frame and goes
into the next, it might be best for the variable object to be out of scope.
Does GDB check the procedure name is different in this case? (if it's the
same procedure, the variable object could presumably stay in scope).

 > There seem to be a bunch of different ways a varobj can associate
 > with a frame; I guess we don't need to stop varobjs that have
 > use_current_frame or no valid_block?

Do you mean use_selected_frame?

-var-create - * fred  (USE_CURRENT_FRAME)    Usual case.  Documented.
-var-create - @ fred  (USE_SELECTED_FRAME)   Undocumented.

I think the latter is evaluated in the frame where execution stops.

 > >  > Right now we never delete varobjs automatically.  We could preserve
 > >  > that, but set a flag on the varobjs indicating they're permanently out
 > >  > of scope?
 > > 
 > > What value is a variable object that is permanently out of scope?
 > 
 > Just in_scope="false".

I mean "what worth/benefit". :-)

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