From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3280 invoked by alias); 4 Aug 2004 04:36:24 -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 3269 invoked from network); 4 Aug 2004 04:36:23 -0000 Received: from unknown (HELO blount.mail.mindspring.net) (207.69.200.226) by sourceware.org with SMTP; 4 Aug 2004 04:36:23 -0000 Received: from user-119a90a.biz.mindspring.com ([66.149.36.10] helo=berman.michael-chastain.com) by blount.mail.mindspring.net with esmtp (Exim 3.33 #1) id 1BsDUk-0003wD-00; Wed, 04 Aug 2004 00:35:18 -0400 Received: from mindspring.com (localhost [127.0.0.1]) by berman.michael-chastain.com (Postfix) with SMTP id 37A904B102; Wed, 4 Aug 2004 00:35:40 -0400 (EDT) Date: Wed, 04 Aug 2004 04:36:00 -0000 From: Michael Chastain To: cagney@gnu.org Subject: Re: new testsuite function for c++ ptype Cc: gdb@sources.redhat.com, david.carlton@sun.com, carlton@bactrian.org Message-ID: <4110679B.nailCV23CXHLM@mindspring.com> References: <410F9C94.nail8KU11N4AM@mindspring.com> <410FE479.1020104@gnu.org> In-Reply-To: <410FE479.1020104@gnu.org> User-Agent: nail 10.8 6/28/04 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2004-08/txt/msg00018.txt.bz2 Andrew Cagney wrote: ac> { ac> { field private "int a;" } ac> { method public "virtual int f();" } ac> } That's a great idea! I like the flat 3-tuples a bit better than the more nested "field { private "int a;" }" form. Then I can do: { { vbptr private "A" } { field private "int a;" } { method public "virtual int f();" } } This is much more flexible for the future. And it cuts down on the required backslashes, too. ac> - I don't undersand why "V" appears twice in: ac> > "class" "VA" { "public virtual V" } \ ac> > { "V" } \ ac> I guess I'm really asking if "V" can be extracted from "public virtual V" Almost, but it won't actually work. The problem is indirect base classes: cp_test_ptype_class "ptype pBe" "ptype pBe" \ "class" "B" { "public A" } \ { { vbptr private "V" } { field private "int a;" } { method public "virtual int f(); } } \ * I could say: all the direct virtual base classes are automatically entered in the vbptr list, so the caller only has to list the indirect virtual base classes. I'm dubious about that, because it's more complicated than just "list all the vbptrs that pop up". Michael C