On Wednesday 29 November 2006 17:24, Daniel Jacobowitz wrote: > 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. Here's it. - Volodya * varobj.c (varobj_create): Don't call release_value. (varobj_set_value): Likewise. (install_new_value): Call coerce_ref and release_value on the value. Add asserts. testsuite/ * lib/mi-support.exp (mi_runto): Accept "()" after function name. (mi_create_varobj): New function. (mi_varobj_update): New function. (mi_Check_varobj_value): New function. * gdb.mi/mi-cpp.exp: New file. * gdb.mi/mi-cpp.cpp: New file.