MI/C++/references fixup

Daniel Jacobowitz drow@false.org
Wed Nov 29 14:24:00 GMT 2006


On Wed, Nov 29, 2006 at 05:15:04PM +0300, Vladimir Prus wrote:
> > > +  /* We are not interested in address of references, and given
> > > +     that in C++ reference is not rebindable, it cannot
> > > +     meaningfully change.  So, get hold of the real value.  */
> >
> > in the address of a reference, in C++ a reference.
> >
> > In C++ it can't meaningfully change.  In a program, though, it can;
> > once when it's initialized, and again if something scribbles on the
> > stack.  And that might be what you're trying to debug.  So, I'm
> > a little wary of this; it seems to me that we ought to check for both
> > changes in the address and value (sort of like we do for watchpoints).
> 
> In practice, if the address changes, the value also changes, so the user can 
> notice. Second, if user really wants to get the address, he can do that 
> with "&whatever".

I suppose that's true.  Want to post an updated patch, and we'll see if
anyone has a reason to keep it?  We're leaving the CLI as it was, this
time.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb-patches mailing list