From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32000 invoked by alias); 10 Dec 2006 04:19:10 -0000 Received: (qmail 31987 invoked by uid 22791); 10 Dec 2006 04:19:08 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 10 Dec 2006 04:18:58 +0000 Received: from kahikatea.snap.net.nz (p202-124-120-4.snap.net.nz [202.124.120.4]) by viper.snap.net.nz (Postfix) with ESMTP id 3BA513D816F; Sun, 10 Dec 2006 17:20:04 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id 7BD06BE3A7; Sun, 10 Dec 2006 17:14:30 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17787.35236.492750.204386@kahikatea.snap.net.nz> Date: Sun, 10 Dec 2006 04:19:00 -0000 To: Vladimir Prus Cc: gdb-patches@sources.redhat.com Subject: Re: MI: fix base members in references In-Reply-To: <200612100114.44118.ghost@cs.msu.su> References: <17787.10504.215397.177658@kahikatea.snap.net.nz> <200612100037.24768.ghost@cs.msu.su> <17787.11900.251681.440151@kahikatea.snap.net.nz> <200612100114.44118.ghost@cs.msu.su> X-Mailer: VM 7.19 under Emacs 22.0.91.14 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/msg00147.txt.bz2 Vladimir Prus writes: > does the code you've added ever does anything? It seems to handle variable objects of references to pointers correctly. Have you tried it? and: > > Are you saying get_type should use value_type (var->value) instead of > > var->type? > > No. I'm saying that instead of using get_type and then additionally doing > something with the type, we should directly use value_type (var->value). If > we want to know how many children a value has, and you know the type of the > value, it does not make sense to take some other type, do some > transformation on it, and the hope you'll get the same type. You can just > use the type that's right. I don't think so because it looks at target_type not type. But these are unfamiliar concepts to me, so if you think it can be done more simply, or if my patch doesn't work, post a patch and I'll try it out. -- Nick http://www.inet.net.nz/~nickrob