From patchwork Fri Sep 19 16:48:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aldy Hernandez X-Patchwork-Id: 391355 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id BA8BC14016B for ; Sat, 20 Sep 2014 02:49:09 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type; q=dns; s=default; b=C81/cgd/IyAGJJTbB k/4JzRmogu8UdC1y5Oh/RcFeTRYjvaf01eus77acZz1tkXysnLadlrFwL6n5dUsw gV3BNYnpF8lzeS23ZoiyWObGNWZG0KaDFfDziiAsqQNFe3akeH5e6z46GCSLjENJ +bdrONpEvhhM12dJSJrW2sOHi4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type; s=default; bh=5vA3LaHQXB0ZITEkywP0fg1 E7r8=; b=Ix1dad5ZYut+FmD2kuCjX4F33CN41tTdXs+b+sFmnZGMeDny3fk2DRP CNcoxGFzBnH0RwMiWg41AbP9WGSQtPAH/4I5iurC+WxM8ncw1smtSultTCvcbAqP YvbhP3XBT2i02VNM7h7L4v/O5r8Jq+z1OSStNZWIYLRHtyZO74+k= Received: (qmail 30043 invoked by alias); 19 Sep 2014 16:49:01 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 30031 invoked by uid 89); 19 Sep 2014 16:49:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 19 Sep 2014 16:49:00 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s8JGmw6K016930 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 19 Sep 2014 12:48:58 -0400 Received: from reynosa.quesejoda.com (vpn-53-12.rdu2.redhat.com [10.10.53.12]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s8JGmv47026020; Fri, 19 Sep 2014 12:48:58 -0400 Message-ID: <541C5E79.7060200@redhat.com> Date: Fri, 19 Sep 2014 10:48:57 -0600 From: Aldy Hernandez User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 MIME-Version: 1.0 To: Jason Merrill , gcc-patches , Richard Biener Subject: Re: [debug-early] Disable removal of DW_tags* while generating subprogram DIEs References: <541B31C4.8010603@redhat.com> <541B38A1.5060406@redhat.com> In-Reply-To: <541B38A1.5060406@redhat.com> On 09/18/14 13:55, Jason Merrill wrote: > On 09/18/2014 03:25 PM, Aldy Hernandez wrote: >> This patch disables removing of >> DW_AT_{declaration,object_pointer,formal_parameter} tags while >> generating a DIE for subprograms. Now that we generate dwarf info >> early, we will always have an old_die the second time around. I see no >> need to remove the aforementioned tags, only to create them again >> (incorrectly in a C++ testcase I have). > > I think you probably still want to remove DW_AT_declaration, as you > probably don't want it the second time around (and wouldn't create it > again). Sounds good to me. Applied the attached patch. Thanks. commit b033487ef30cf7b81edb8cd8346f874ec78e0b20 Author: Aldy Hernandez Date: Fri Sep 19 10:46:54 2014 -0600 * dwarf2out.c (gen_subprogram_die): Remove DW_AT_declaration even if we have an old die. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 68b4650..48b1106 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -18310,6 +18310,10 @@ gen_subprogram_die (tree decl, dw_die_ref context_die) remove_AT (subr_die, DW_AT_declaration); remove_AT (subr_die, DW_AT_object_pointer); remove_child_TAG (subr_die, DW_TAG_formal_parameter); +#else + /* We don't need the DW_AT_declaration the second or third + time around anyhow. */ + remove_AT (subr_die, DW_AT_declaration); #endif } else