From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23748 invoked by alias); 30 Nov 2006 07:31:29 -0000 Received: (qmail 23735 invoked by uid 22791); 30 Nov 2006 07:31:27 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 30 Nov 2006 07:31:20 +0000 Received: (qmail 5586 invoked from network); 30 Nov 2006 07:31:18 -0000 Received: from unknown (HELO 172.16.unknown.plus.ru) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 30 Nov 2006 07:31:18 -0000 From: Vladimir Prus To: Nick Roberts Subject: Re: MI/C++/references fixup Date: Thu, 30 Nov 2006 07:31:00 -0000 User-Agent: KMail/1.9.1 References: <200611291215.21876.vladimir@codesourcery.com> <200611291741.13617.vladimir@codesourcery.com> <17774.7608.862541.696058@kahikatea.snap.net.nz> In-Reply-To: <17774.7608.862541.696058@kahikatea.snap.net.nz> Cc: gdb-patches@sources.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200611301031.07625.vladimir@codesourcery.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-11/txt/msg00415.txt.bz2 On Thursday 30 November 2006 02:54, you wrote: > > > > > 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 I've no problems with 'cp' and '.cc'. I don't think that '-var-' is good -- now, there is just single MI test dealing with C++, so I want a testcase that will accumulate all C++ specific things, not necessary related to variable objects. But I don't care much. - Volodya