RFA: Document @-frame variable objects

Nick Roberts nickrob@snap.net.nz
Sat May 26 05:53:00 GMT 2007


 >  > +@item
 >  > +If it is @samp{@@}, then the expression has no fixed scope: GDB
 >  > +evaluates @var{expression} in the currently selected frame, and future
 >  > +@code{-var-update} commands will use whatever frame is selected when
 >  > +they are invoked.  Variable objects of this sort may go in and out of
 >  > +scope as the program runs, and their type may change from one update
 >  > +to the next.
 > 
 > I don't think this is accurate.  If you have two frames, where i=10 in
 > one and i=5 in the other, GDB won't report any change with -var-update
 > if you do "up" and "down" to move between them.

Actually I'm confused now because GDB 6.6 seems to behave differently to GDB in
CVS.  In the latter, it does report changes, albeit with the wrong value in the
frame in which the varobj wasn't created.

I see that there is just one test for this type of varobj -- just for the
creation, in mi-var-cmd.exp and mi2-var-cmd.exp -- which explains why changes
haven't been noticed.  If we are serious about using @, then we really need to
check it's behavior and add more tests.

-- 
Nick                                           http://www.inet.net.nz/~nickrob



More information about the Gdb-patches mailing list