From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8112 invoked by alias); 1 Oct 2008 16:04:46 -0000 Received: (qmail 8056 invoked by uid 22791); 1 Oct 2008 16:04:44 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 01 Oct 2008 16:04:09 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id B78922A9686; Wed, 1 Oct 2008 12:04:07 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id SywlNBgoDIsM; Wed, 1 Oct 2008 12:04:07 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 7808D2A9684; Wed, 1 Oct 2008 12:04:07 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 422DFE7ACD; Wed, 1 Oct 2008 09:04:05 -0700 (PDT) Date: Wed, 01 Oct 2008 16:04:00 -0000 From: Joel Brobecker To: Tom Tromey Cc: Thiago Jung Bauermann , gdb-patches ml Subject: Re: [rfc] expose gdb values to python Message-ID: <20081001160405.GF3665@adacore.com> References: <1221199426.24580.26.camel@localhost.localdomain> <20081001054741.GE3665@adacore.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i 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: 2008-10/txt/msg00015.txt.bz2 > Joel> My initial reaction to this question is that the Value object > Joel> should follow the same semantics as the debugger. > > By this I take you to mean the semantics of the currently selected > language...? Yes. I think it should mean the currently-selected language when the value is created? > This is the bad case: > > class B1 { int x; }; > class B2 { int x; }; > class D : B1, B2 { }; > > I think the current proposal is to try to follow the current language, > and then have the user cast 'v' to B1 or B2 if needed. Argh! Multiple inheritance. I see the problem, now. The proposal makes sense. > I think we can do this, but there is a cost, namely conflicts between > methods on Value and field names in the inferior will have to be > resolved in favor of the method. So, robust programs will always have > to use the [] syntax anyway. In that case, I don't see much value in my request. Oh well! -- Joel