From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5261 invoked by alias); 15 Nov 2006 09:38:35 -0000 Received: (qmail 5245 invoked by uid 22791); 15 Nov 2006 09:38:33 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 15 Nov 2006 09:38:27 +0000 Received: (qmail 6315 invoked from network); 15 Nov 2006 09:38:25 -0000 Received: from unknown (HELO ?172.16.64.38?) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 15 Nov 2006 09:38:25 -0000 From: Vladimir Prus To: gdb@sources.redhat.com Subject: MI and anonymous unions User-Agent: KMail/1.9.1 MIME-Version: 1.0 Content-Disposition: inline X-Length: 1493 X-UID: 13217 Date: Wed, 15 Nov 2006 09:38:00 -0000 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200611151238.16778.vladimir@codesourcery.com> 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/msg00095.txt.bz2 I've noticed that MI does not work nice with anonymous unions. Consider this structure: struct S { union { int i; int j; }; }; 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. How about using some unique identifier for variable objects corresponding for anonymous unions? Say "@N"? - Volodya