From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13245 invoked by alias); 9 Dec 2006 21:50:17 -0000 Received: (qmail 13234 invoked by uid 22791); 9 Dec 2006 21:50:15 -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; Sat, 09 Dec 2006 21:50:05 +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 183633DA532; Sun, 10 Dec 2006 10:51:11 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id A0307BE3F2; Sun, 10 Dec 2006 10:45:37 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17787.11900.251681.440151@kahikatea.snap.net.nz> Date: Sat, 09 Dec 2006 21:50:00 -0000 To: Vladimir Prus Cc: gdb-patches@sources.redhat.com Subject: Re: MI: fix base members in references In-Reply-To: <200612100037.24768.ghost@cs.msu.su> References: <17787.10504.215397.177658@kahikatea.snap.net.nz> <200612100037.24768.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/msg00144.txt.bz2 > > > I would have preferred if instead of adding if, the code was modified to > > > look at > > > > > value_type (var->value) > > > > > as opposed to > > > > > var->type > > > > I'm not sure that I follow your point. The patch just gets the target > > type, after dereferencing, in the case of a pointer. > > > > > The latter is the type of the varobj expression as it is in source > > > program. The former is the value we're actually showing. It makes sense > > > to use value_type (var->value) for all presentation purposes. > > > > The former appears to be a type also (not a value). > > Slight typo: the former is the type of the value we're actually showing. So, > you don't need to take original type and try to arrived to the type that > should be shown to the user, you just use value_type (var->value), and don't > need any further processing. One less thing that can be broken in future. I'm still not sure that I follow. My patch doesn't look at var->type directly. Are you saying get_type should use value_type (var->value) instead of var->type? Or even all occurrances of var->type? This would presumably be a separate patch altogether. -- Nick http://www.inet.net.nz/~nickrob