From patchwork Fri Jan 31 05:09:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Brobecker X-Patchwork-Id: 315511 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 8B5E92C008F for ; Fri, 31 Jan 2014 16:09:22 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=pVCWqMUbUHLbAPMzV wZW62y8gNd4AYb/P2OvVl/62g9+7KNq2KUOyxN/Xw0sXxnSrJ+Fekg/ixx90DrNv GzNibNg3touQM6IZQTsAORC48jG0aC6CcIPdFeAhWxgi+SeVgcWo4/L5GWeIeMZs 41oliFuufhErKm98orj94x74x4= 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:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=default; bh=uzFCWhwmnb3SQpyB6AsJlEY Vpro=; b=j1CyYc8r33/BgRSVWGoG58byEwY1iKHDdQT9ryzh6fgVHrxUcyS6qrj R0/0hqnbFimQWGlpOu9bANZLk7Ksdnljk5njX1DJolvPI3lWgbLUTq3sK2erhdIJ qjP0k8aWseoH3SguxT0zLSoeXbH1DQW8MCg3ip9bMZTjUaW3ClrU= Received: (qmail 22547 invoked by alias); 31 Jan 2014 05:09:13 -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 22532 invoked by uid 89); 31 Jan 2014 05:09:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 31 Jan 2014 05:09:11 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 32CB21162AC; Fri, 31 Jan 2014 00:09:09 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id CRONRgcTqEs0; Fri, 31 Jan 2014 00:09:09 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 87E9E116284; Fri, 31 Jan 2014 00:09:08 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 6590FE02A5; Fri, 31 Jan 2014 09:09:05 +0400 (RET) Date: Fri, 31 Jan 2014 09:09:05 +0400 From: Joel Brobecker To: Jason Merrill Cc: gcc-patches@gcc.gnu.org Subject: Re: [RFA/dwarf v2] Add DW_AT_GNAT_use_descriptive_type flag for Ada units. Message-ID: <20140131050905.GC9810@adacore.com> References: <20130219140617.GI22175@adacore.com> <51244326.6060806@redhat.com> <20130220034257.GC31493@adacore.com> <51244816.8020101@redhat.com> <20140131034637.GB9810@adacore.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140131034637.GB9810@adacore.com> User-Agent: Mutt/1.5.21 (2010-09-15) [resending with the patch - sorry about that] Hi Jason, On Tue, Feb 19, 2013 at 10:50:46PM -0500, Jason Merrill wrote: > On 02/19/2013 10:42 PM, Joel Brobecker wrote: > >This is useful when a DIE does not have a descriptive type attribute. > >In that case, the debugger needs to determine whether the unit > >was compiled with a compiler that normally provides that information, > >or not. > > Ah. OK, then. But I'd prefer to call it > DW_AT_GNAT_use_descriptive_type, to follow the convention of keeping > the vendor tag at the beginning of the name. Almost a year ago, you privately approved a small patch of mine, with the small request above. I'm sorry I let it drag so long! Here is the updated patch. include/ChangeLog: * dwarf2.def: Rename DW_AT_use_GNAT_descriptive_type into DW_AT_GNAT_use_descriptive_type. gcc/ChangeLog: * dwarf2out.c (gen_compile_unit_die): Add DW_AT_use_GNAT_descriptive_type attribute for Ada units. Tested on x86_64-linux. I should also adjust the Wiki page accordingly, but the login process keeps timing out. I know I have the right login and passwd since I succesfully reset them using the passwd recovery procedure, just in case the error was due to bad credentials. I'll try again later. If approved, I will also take care of coordinating the dwarf2.def change with binutils-gdb.git. Is this patch still OK to commit? Thank you, From 7aae3721addf6905113d9f0287a5cbb5301a462b Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Thu, 3 Jan 2013 09:25:12 -0500 Subject: [PATCH] [dwarf] Add DW_AT_GNAT_use_descriptive_type flag for Ada units. This patch first renames the DW_AT_use_GNAT_descriptive_type DWARF attribute into DW_AT_GNAT_use_descriptive_type to better follow the usual convention of keeping the vendor tag at the beginning of the name. It then modifies dwadrf2out to generate this attribute for Ada units. include/ChangeLog: * dwarf2.def: Rename DW_AT_use_GNAT_descriptive_type into DW_AT_GNAT_use_descriptive_type. gcc/ChangeLog: * dwarf2out.c (gen_compile_unit_die): Add DW_AT_use_GNAT_descriptive_type attribute for Ada units. --- gcc/dwarf2out.c | 4 ++++ include/dwarf2.def | 2 +- 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index d1ca4ba..057605c 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -19318,6 +19318,10 @@ gen_compile_unit_die (const char *filename) /* The default DW_ID_case_sensitive doesn't need to be specified. */ break; } + + if (language == DW_LANG_Ada95) + add_AT_flag (die, DW_AT_GNAT_use_descriptive_type, 1); + return die; } diff --git a/include/dwarf2.def b/include/dwarf2.def index 71a37b3..4dd636e 100644 --- a/include/dwarf2.def +++ b/include/dwarf2.def @@ -398,7 +398,7 @@ DW_AT (DW_AT_VMS_rtnbeg_pd_address, 0x2201) /* GNAT extensions. */ /* GNAT descriptive type. See http://gcc.gnu.org/wiki/DW_AT_GNAT_descriptive_type . */ -DW_AT (DW_AT_use_GNAT_descriptive_type, 0x2301) +DW_AT (DW_AT_GNAT_use_descriptive_type, 0x2301) DW_AT (DW_AT_GNAT_descriptive_type, 0x2302) /* UPC extension. */ DW_AT (DW_AT_upc_threads_scaled, 0x3210) -- 1.7.0.4