From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23379 invoked by alias); 6 Jan 2008 09:11:08 -0000 Received: (qmail 23371 invoked by uid 22791); 6 Jan 2008 09:11:07 -0000 X-Spam-Check-By: sourceware.org Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 06 Jan 2008 09:10:48 +0000 Received: from Relay2.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id D960D2F845; Sun, 6 Jan 2008 10:10:45 +0100 (CET) From: Andreas Schwab To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: [commit/Ada] Add handling of "ptype TYPE_NAME.FIELD0.[...].FIELDN" expressions References: <20080104151340.GC3758@adacore.com> <20080105185319.GA10591@caradoc.them.org> <20080106043437.GI5975@adacore.com> X-Yow: Well, O.K. I'll compromise with my principles because of EXISTENTIAL DESPAIR! Date: Sun, 06 Jan 2008 09:11:00 -0000 In-Reply-To: <20080106043437.GI5975@adacore.com> (Joel Brobecker's message of "Sat\, 5 Jan 2008 20\:34\:37 -0800") Message-ID: User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes 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/msg00097.txt.bz2 Joel Brobecker writes: >> > (gdb) ptype circle.pos >> > Invalid attempt to select from type: "circle.pos". >> > >> > The attached patch enhances the debugger to able to do the above. >> >> Is this actually valid in Ada? You can't do this in C, which is why >> GDB doesn't handle it for ptype. > > Actually, it isn't. But it seemed like a natural extension... For C you can use this: (gdb) ptype ((circle)0).pos Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."