From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13483 invoked by alias); 15 Nov 2006 14:54:14 -0000 Received: (qmail 13475 invoked by uid 22791); 15 Nov 2006 14:54:13 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Wed, 15 Nov 2006 14:54:07 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1GkM9N-0006kU-Or for gdb@sourceware.org; Wed, 15 Nov 2006 09:54:05 -0500 Date: Wed, 15 Nov 2006 14:54:00 -0000 From: Daniel Jacobowitz To: gdb@sourceware.org Subject: Re: MI and anonymous unions Message-ID: <20061115145405.GA25212@nevyn.them.org> Mail-Followup-To: gdb@sourceware.org References: <200611151238.16778.vladimir@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200611151238.16778.vladimir@codesourcery.com> User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-11/txt/msg00097.txt.bz2 On Wed, Nov 15, 2006 at 12:38:16PM +0300, Vladimir Prus wrote: > Traversing it with MI eventually gives: > > -var-list-children V.public > ^done,numchild="1",children=[child={name="V.public.",exp="",numchild="1", > type="union {...}"}] > (gdb) > -var-list-children V.public. > ^done,numchild="1",children=[ > child={name="V.public..public",exp="public",numchild="2"}] > (gdb) > -var-list-children V.public..public > ..... > > Although this kinda works, I'm pretty sure UI won't be happy about empty > expression for a variable object, and if you have two anonymous unions, you > can't even address them. I'm not sure what to do for the empty expression. There's nothing we can put there which would act like a named union, since you need one less period - hmm, we were just discussing an MI command to recreate expressions the other day... How do people use the exp="" result? Should it be ""? > How about using some unique identifier for variable objects corresponding for > anonymous unions? Say "@N"? That sounds reasonable. -- Daniel Jacobowitz CodeSourcery