From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10675 invoked by alias); 23 Apr 2009 22:40:21 -0000 Received: (qmail 10657 invoked by uid 22791); 23 Apr 2009 22:40:20 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 23 Apr 2009 22:40:12 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n3NMeBQe013829 for ; Thu, 23 Apr 2009 18:40:11 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n3NMeAMW009473; Thu, 23 Apr 2009 18:40:10 -0400 Received: from opsy.redhat.com (vpn-14-41.rdu.redhat.com [10.11.14.41]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n3NMe99s013581; Thu, 23 Apr 2009 18:40:09 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 24A14C881B1; Thu, 23 Apr 2009 16:40:09 -0600 (MDT) To: Jan Kratochvil Cc: gdb-patches@sourceware.org Subject: Re: [patch] Fix PR 9675 - _static_ variables in C++ constructors References: <20081221185428.GA27604@host0.dyn.jankratochvil.net> From: Tom Tromey Reply-To: tromey@redhat.com Date: Thu, 23 Apr 2009 22:40:00 -0000 In-Reply-To: <20081221185428.GA27604@host0.dyn.jankratochvil.net> (Jan Kratochvil's message of "Sun\, 21 Dec 2008 19\:54\:28 +0100") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.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: 2009-04/txt/msg00672.txt.bz2 >>>>> "Jan" == Jan Kratochvil writes: Jan> Fix visibility of _static_ variables in C++ constructors, Jan> as I saw it now even in GDB BZ: Jan> http://sourceware.org/bugzilla/show_bug.cgi?id=9675 Jan> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33044 Jan> https://bugzilla.redhat.com/show_bug.cgi?id=445912 Thanks for writing this. It took me a while to understand this (I had to go read up on the DWARF involved), but I think I get what is going on here. I have a couple comments. Jan> while (child_die && child_die->tag) Jan> { Jan> - process_die (child_die, cu); Jan> + attr = dwarf2_attr (child_die, DW_AT_abstract_origin, cu); Jan> + if (!attr) Jan> + complaint (&symfile_complaints, Jan> + _("Child DIE 0x%x of DIE 0x%x has missing " Jan> + "DW_AT_abstract_origin"), child_die->offset, Jan> + die->offset); I suspect this complaint is incorrect. DWARF 3.3.8.3 exception #3 says that a DIE in the concrete tree does not necessarily need to refer to a DIE in the origin tree. If I understand the patch correctly, this complaint will be issued in exactly this case. Is that accurate? Jan> + if (offsetp[-1] == *offsetp) Jan> + complaint (&symfile_complaints, Jan> + _("Child DIEs of DIE 0x%x duplicitly abstract-origin " Jan> + "referenced DIE 0x%x"), die->offset, *offsetp); This text reads strangely. How about: Multiple children of DIE 0x%s refer to DIE 0x%x as their abstract origin Other than these things this patch looks ok to me. Tom