From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19989 invoked by alias); 28 Aug 2007 20:04:11 -0000 Received: (qmail 19906 invoked by uid 22791); 28 Aug 2007 20:04:10 -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; Tue, 28 Aug 2007 20:04:05 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 41B6C2AAB2B; Tue, 28 Aug 2007 16:04:04 -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 Ww5uHtm4qeNG; Tue, 28 Aug 2007 16:04:04 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 087FE2AAA4C; Tue, 28 Aug 2007 16:04:04 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id E87B4E7B58; Tue, 28 Aug 2007 13:03:56 -0700 (PDT) Date: Tue, 28 Aug 2007 20:04:00 -0000 From: Joel Brobecker To: Luis Machado Cc: Carlos Eduardo Seo , gdb-patches@sourceware.org Subject: Re: [patch] ptype: show members of an unnamed struct inside an union Message-ID: <20070828200356.GA3795@adacore.com> References: <46C4D20E.1010703@linux.vnet.ibm.com> <20070828171422.GB3874@adacore.com> <46D47155.5000403@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46D47155.5000403@linux.vnet.ibm.com> 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: 2007-08/txt/msg00502.txt.bz2 > >Similarly in your example: > > > > (gdb) ptype mypage.u > > type = union { > > struct { > > int mapping; > > }; > > } > > Are you considering a named Union structure here? I could not reproduce > this locally, since there's no such member "u" in the data structure. Yes, I had to add a name to this field. Otherwise, there is no way to name it! -- Joel