From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26903 invoked by alias); 6 Dec 2006 08:44:38 -0000 Received: (qmail 26895 invoked by uid 22791); 6 Dec 2006 08:44:37 -0000 X-Spam-Check-By: sourceware.org Received: from zigzag.lvk.cs.msu.su (HELO zigzag.lvk.cs.msu.su) (158.250.17.23) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 06 Dec 2006 08:44:30 +0000 Received: from Debian-exim by zigzag.lvk.cs.msu.su with spam-scanned (Exim 4.50) id 1GrsO4-0002Nr-6s for gdb-patches@sources.redhat.com; Wed, 06 Dec 2006 11:44:24 +0300 Received: from localhost ([127.0.0.1] helo=ip6-localhost) by zigzag.lvk.cs.msu.su with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.50) id 1GrsNl-0002N0-6Y; Wed, 06 Dec 2006 11:44:01 +0300 From: Vladimir Prus To: Nick Roberts , Jim Blandy , gdb-patches@sources.redhat.com Subject: Re: MI: fix base members in references Date: Wed, 06 Dec 2006 08:44:00 -0000 User-Agent: KMail/1.9.1 References: <200611291555.42209.ghost@cs.msu.su> <17781.58050.562000.498586@kahikatea.snap.net.nz> <20061205214654.GA29947@nevyn.them.org> In-Reply-To: <20061205214654.GA29947@nevyn.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200612061143.59682.ghost@cs.msu.su> 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-12/txt/msg00059.txt.bz2 On Wednesday 06 December 2006 00:46, Daniel Jacobowitz wrote: > On Wed, Dec 06, 2006 at 10:21:06AM +1300, Nick Roberts wrote: > > The comment in varobj.c refers to "Baseclass" and I presume the original author > > included the case > > > > TYPE_CODE (value_type (parent->value)) == TYPE_CODE_REF > > > > for a specific reason. > > Probably, but as Vlad's explanation is correct, either the original > author was wrong or the behavior of value_ind has changed. Something > in this code should change, but see below. > > On Tue, Dec 05, 2006 at 01:33:12PM -0800, Jim Blandy wrote: > > (By the way --- it's handy to include a link to the post with the > > patch, or ideally the patch itself.) > > Is a threading mailer really so much to ask? :-) > > > How should this behave if parent->value is a reference to a pointer? > > Shouldn't it follow the ref, and then behave the same as when it's a > > pointer? If so, then the fix would be something like this instead > > (not that I understand this code): > > If this is always the same values affected by Vlad's other patch which > calls coerce_ref when setting the value, then maybe we should just be > asserting there is no reference here after that patch. That would be best. However, I also want base/references problem to be fixed on branch, and the big reference-changing patch might be too big for branch, while base/references patch is small and strictly makes previously broken use case working, without any other changes. - Volodya