From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6135 invoked by alias); 7 Jan 2008 14:48:42 -0000 Received: (qmail 6125 invoked by uid 22791); 7 Jan 2008 14:48:42 -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; Mon, 07 Jan 2008 14:48:24 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id E85822A9657; Mon, 7 Jan 2008 09:48:22 -0500 (EST) 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 0vlUjLS0UdTb; Mon, 7 Jan 2008 09:48:22 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 28D252A964E; Mon, 7 Jan 2008 09:48:22 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id C6477E7ACB; Mon, 7 Jan 2008 06:47:39 -0800 (PST) Date: Mon, 07 Jan 2008 14:48:00 -0000 From: Joel Brobecker To: Andreas Schwab Cc: gdb-patches@sourceware.org Subject: Re: [commit/Ada] Add handling of "ptype TYPE_NAME.FIELD0.[...].FIELDN" expressions Message-ID: <20080107144739.GG32517@adacore.com> References: <20080104151340.GC3758@adacore.com> <20080105185319.GA10591@caradoc.them.org> <20080106043437.GI5975@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-01/txt/msg00108.txt.bz2 > > Actually, it isn't. But it seemed like a natural extension... > > For C you can use this: > > (gdb) ptype ((circle)0).pos That's clever. Thinking more about it, I'm realizing that it might not be as natural as I first thought it would be. The fact is that I did use it without really thinking about it a couple of times, but it's as easy to do: ptype circle, see what the type of pos is, then do ptype of that type, etc. IIRC, the extension was requested by a customer, so we (AdaCore) cannot remove it from our sources. But we can certainly remove it from the FSF tree if we want to. At this point, I think it's harmless, so I'm inclined to leave it for now. Comments welcome. -- Joel