From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3164 invoked by alias); 22 Aug 2002 20:46:10 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 3153 invoked from network); 22 Aug 2002 20:46:09 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 22 Aug 2002 20:46:09 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 17hyqG-0000N8-00; Thu, 22 Aug 2002 15:46:08 -0500 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 17hyqu-0008Kd-00; Thu, 22 Aug 2002 16:46:48 -0400 Date: Thu, 22 Aug 2002 13:46:00 -0000 From: Daniel Jacobowitz To: David Carlton Cc: gdb Subject: Re: TYPE_VPTR_BASETYPE and TYPE_DOMAIN_TYPE Message-ID: <20020822204648.GA31816@nevyn.them.org> Mail-Followup-To: David Carlton , gdb References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i X-SW-Source: 2002-08/txt/msg00269.txt.bz2 On Thu, Aug 22, 2002 at 01:38:25PM -0700, David Carlton wrote: > What's the deal with TYPE_VPTR_BASETYPE and TYPE_DOMAIN_TYPE being the > same thing? Did struct main_type once contain two different members > that got merged? It seems like a potential source of confusion right > now (it certainly slowed me down when tracking down a recent bug). > > It seems like there are two obvious fixes. If we're not planning to > split them back apart in the near future, then either > TYPE_VPTR_BASETYPE or TYPE_DOMAIN_TYPE should be elimininated. If we > want to leave open the possibility of splitting them back apart, > however, then the comment before the definition of the vptr_basetype > field should be emended to say when you're supposed to use > TYPE_VPTR_BASETYPE to access it and when you're supposed to use > TYPE_DOMAIN_TYPE to access it. (And, of course, all uses should be > checked to make sure they follow that recommendation.) > > I'd be happy to make either of those changes, if people agree that one > of them is a good idea. As I understand it TYPE_DOMAIN_TYPE applies to methods, but TYPE_VPTR_BASETYPE definitely only has meaning for structures. Probably just the comment needs to be updated. Now it's: For types that are pointer to member types (TYPE_CODE_MEMBER), VPTR_BASETYPE is the type that this pointer is a member of. For method types (TYPE_CODE_METHOD), VPTR_BASETYPE is the aggregate type that contains the method. Can you think of any time where having both would be useful? -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer