From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6256 invoked by alias); 23 Sep 2011 12:02:53 -0000 Received: (qmail 6247 invoked by uid 22791); 23 Sep 2011 12:02:51 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 23 Sep 2011 12:02:37 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1R74Si-00031F-Fg from pedro_alves@mentor.com ; Fri, 23 Sep 2011 05:02:36 -0700 Received: from scottsdale.localnet ([172.16.63.104]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 23 Sep 2011 13:02:34 +0100 From: Pedro Alves To: Jan Kratochvil Subject: Re: [patch 11/12] entryval#2: @entry values even for references Date: Fri, 23 Sep 2011 12:08:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.38-11-generic; KDE/4.7.0; x86_64; ; ) Cc: gdb-patches@sourceware.org References: <20110913195046.GL12849@host1.jankratochvil.net> <201109231050.22720.pedro@codesourcery.com> <20110923113941.GA14054@host1.jankratochvil.net> In-Reply-To: <20110923113941.GA14054@host1.jankratochvil.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201109231302.33369.pedro@codesourcery.com> X-IsSubscribed: yes 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: 2011-09/txt/msg00430.txt.bz2 On Friday 23 September 2011 12:39:41, Jan Kratochvil wrote: > On Fri, 23 Sep 2011 11:50:22 +0200, Pedro Alves wrote: > > Sorry, in the hurry, I hadn't noticed you had used `S &s; class S { char a, b; };'. > > That's not the case I raised originally. The case is an entry val of > > type `struct { int a; long &b; }'. Calling an entry object of that > > type `s', if we "print s@entry", I think we'll: > > In such case the parameter `s' is not TYPE_CODE_REF and therefore > entry_data_value_funcs do not get ever used and therefore > coerce_ref_if_computed will always return NULL. > > coerce_ref_if_computed is there only as a hack for TYPE_CODE_REF which > dereferences into something else than what a native normal such > TYPE_CODE_REF-pointer would derefefence into. I see, thanks. Okay, let's go with this, with the embedded_offset == 0 assertion in place. I really dislike lval_computed special casing. We should be aiming at making it generic enough to be able to reimplement the regular lval_memory/lval_register, etc. lval types as lval_computed, hence my insistence. -- Pedro Alves