From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21116 invoked by alias); 29 Aug 2007 20:44:31 -0000 Received: (qmail 21103 invoked by uid 22791); 29 Aug 2007 20:44:31 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 29 Aug 2007 20:44:26 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 691A298153 for ; Wed, 29 Aug 2007 20:44:26 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 45C2698101 for ; Wed, 29 Aug 2007 20:44:26 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.67) (envelope-from ) id 1IQUOl-0004CS-GV for gdb-patches@sourceware.org; Wed, 29 Aug 2007 16:44:23 -0400 Date: Wed, 29 Aug 2007 20:44:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sourceware.org Subject: Re: [patch] ptype: show members of an unnamed struct inside an union Message-ID: <20070829204423.GA16129@caradoc.them.org> Mail-Followup-To: gdb-patches@sourceware.org References: <20070829025618.GA26311@caradoc.them.org> <20070829043633.GD3795@adacore.com> <20070829163021.GA32337@caradoc.them.org> <20070829183215.GF3795@adacore.com> <20070829183643.GA9026@caradoc.them.org> <20070829184824.GG3795@adacore.com> <46D5D3AE.4010209@linux.vnet.ibm.com> <20070829202339.GA14859@caradoc.them.org> <46D5D674.4040600@linux.vnet.ibm.com> <20070829204114.GH3795@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070829204114.GH3795@adacore.com> User-Agent: Mutt/1.5.15 (2007-04-09) 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: 2007-08/txt/msg00527.txt.bz2 On Wed, Aug 29, 2007 at 01:41:14PM -0700, Joel Brobecker wrote: > The one reason I think it's a good idea to expand the field description > when the field does not have a name, is because there is no way to > get that information otherwise. But in the case of a named field that > has an anonymous type, we can easily get the type information simply > by selecting it (I mean by that: "ptype my_page.u" where u is the field > name of your union). That's not quite true. You need a variable, or to mess around with casting a pointer; you can't say "ptype my_type.member". -- Daniel Jacobowitz CodeSourcery