From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2645 invoked by alias); 15 Nov 2006 09:35:01 -0000 Received: (qmail 2626 invoked by uid 22791); 15 Nov 2006 09:35:00 -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:34:55 +0000 Received: (qmail 6184 invoked from network); 15 Nov 2006 09:34:54 -0000 Received: from unknown (HELO ?172.16.64.38?) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 15 Nov 2006 09:34:54 -0000 From: Vladimir Prus To: gdb-patches@sources.redhat.com Subject: MI and anonymous unions Date: Wed, 15 Nov 2006 09:35:00 -0000 User-Agent: KMail/1.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200611151234.41560.vladimir@codesourcery.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-11/txt/msg00118.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