From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28233 invoked by alias); 14 Nov 2011 15:45:49 -0000 Received: (qmail 28222 invoked by uid 22791); 14 Nov 2011 15:45:47 -0000 X-SWARE-Spam-Status: No, hits=-7.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 Nov 2011 15:45:28 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pAEFjRQ6004566 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 14 Nov 2011 10:45:27 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id pAEFjRWD032060; Mon, 14 Nov 2011 10:45:27 -0500 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id pAEFjPES011316; Mon, 14 Nov 2011 10:45:26 -0500 From: Tom Tromey To: Keith Seitz Cc: "gdb-patches\@sourceware.org ml" Subject: Re: [RFA] mi/10586 References: <4EBD93D9.2020006@redhat.com> Date: Mon, 14 Nov 2011 15:45:00 -0000 In-Reply-To: <4EBD93D9.2020006@redhat.com> (Keith Seitz's message of "Fri, 11 Nov 2011 13:30:01 -0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: 2011-11/txt/msg00351.txt.bz2 >>>>> "Keith" == Keith Seitz writes: Keith> This bug deals with anonymous structs/unions in varobj. As in: Keith> anonymous structs/unions are unaddressable by MI clients. Keith> This bug has been sitting around for quite some time. Vladimir Prus Keith> first mentioned this in 2006 (yikes!), and this bug was filed in Keith> 2009. At this time, Nick Roberts responded to the bug with a patch Keith> that fixed the problem. Keith> I don't know why Nick never submitted the patch here, so I've tweaked Keith> his original patch and written some tests for it, and I am now Keith> submitting this. Thanks. Keith> 2011-11-11 Keith Seitz Keith> Based on work by Nick Roberts : Keith> * varobj.c (c_describe_child): Synthesize a variable name for Keith> anonymous structs and unions. Keith> (cplus_describe_child): Likewise. ChangeLog should mention the PR. Keith> + type_name = TYPE_FIELD_NAME (type, index); Keith> + if (*type_name == '\0') Keith> + name = xstrprintf ("anonymous%d", index); Keith> + else Keith> + name = type_name; What happens if there is a clash between a named field's name and the generated name for an anonymous field? Tom