From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7861 invoked by alias); 3 Feb 2011 21:07:55 -0000 Received: (qmail 7853 invoked by uid 22791); 3 Feb 2011 21:07:54 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD 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; Thu, 03 Feb 2011 21:07:47 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id p13L7jBU015805 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 3 Feb 2011 16:07:45 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p13L7juh005077; Thu, 3 Feb 2011 16:07:45 -0500 Received: from opsy.redhat.com (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 p13L7i7w025497; Thu, 3 Feb 2011 16:07:44 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id 5B1EE378BA7; Thu, 3 Feb 2011 14:07:44 -0700 (MST) From: Tom Tromey To: Jan Kratochvil Cc: gdb-patches@sourceware.org Subject: Re: RFC: handle case arising from GCC PR 47510 References: <20110202211220.GA9781@host1.dyn.jankratochvil.net> <20110203085907.GA16851@host1.dyn.jankratochvil.net> Date: Thu, 03 Feb 2011 21:07:00 -0000 In-Reply-To: <20110203085907.GA16851@host1.dyn.jankratochvil.net> (Jan Kratochvil's message of "Thu, 3 Feb 2011 09:59:07 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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-02/txt/msg00050.txt.bz2 >>>>> "Jan" == Jan Kratochvil writes: Jan> Then cp_lookup_nested_type crashes as TYPE_TAG_NAME (parent_type) Jan> == NULL - which is correct for anonymous struct - but Jan> cp_lookup_nested_type does not expect it. [...] After coming up with some more examples, it turns out that the DWARF reading part of this patch is very misguided. In particular it would fail if the typedef appeared before the anonymous struct (and GCC did emit this when a namespace was used). And, a more complicated solution (deferring this smashing until after all DIEs were processed) had a problem of its own (we needed multi-level deferrals due to local types). I've asked for a new attribute from GCC, instead, to make the problem more tractable on the gdb side. We'll see what happens. Meanwhile I will probably put in the valops.c change. Tom