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: MI/C++/references fixup


 > > > > 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).

I'm not that familiar with references but presumably the idea is not to have
to think about the address otherwise you might as well use a pointer.

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

This changes to varobj.c look good to me.

        * gdb.mi/mi-cpp.exp: New file.
        * gdb.mi/mi-cpp.cpp: New file.

gdb.mi/mi-var-cp.exp?
gdb.mi/mi-var-cp.cc?

Its for variable objects, and for consistency.  The testsuite has the directory
gdb.cp and it's populated with *.cc files


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