From patchwork Tue Jan 8 12:24:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Brobecker X-Patchwork-Id: 210357 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]) by ozlabs.org (Postfix) with SMTP id ACC982C0087 for ; Tue, 8 Jan 2013 23:24:54 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1358252695; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:From:To:Cc:Subject:Date:Message-Id: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=lF215i4pCXjMRETzD0I7 xfVmbHQ=; b=WkMiazhVwgCCbdggUwaYmvwp2M46d7eOvctfh9LTq8UI9uWOMlJv NPOxFwI/XBM/IMC5SFwBBvXbHvbqmEx4Jbh4eIZL59dCsnm7u7o+SjQzf+JrHbtj xCaJINsjrURytaKv71AQcmm2DIG4s1VSbFGLJA066r5GWiVIij2sBrM= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Received:From:To:Cc:Subject:Date:Message-Id:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=kbpub3ybXe0kuD9niAYzCHi4oGZjPnOAJ6SoJcXqjpQGzCwizug7Dz2WN2MBE4 P2RZA9GHmvgwkcJ8p0fvzLMJhIzGgYJYUn4oPsb/YtXhrYlIlxBHJgOgJdIyJrm9 Rbv+efyXLSPu4zJic1va+uoErFdub3ChMzCDG33lYNy/o=; Received: (qmail 27511 invoked by alias); 8 Jan 2013 12:24:38 -0000 Received: (qmail 27499 invoked by uid 22791); 8 Jan 2013 12:24:35 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL, BAYES_00, RCVD_IN_HOSTKARMA_NO, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 08 Jan 2013 12:24:18 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 387932E4AC; Tue, 8 Jan 2013 07:24:18 -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 pc-F696nPbeR; Tue, 8 Jan 2013 07:24:18 -0500 (EST) Received: from kwai.gnat.com (kwai.gnat.com [205.232.38.4]) by rock.gnat.com (Postfix) with ESMTP id 16AFA2E037; Tue, 8 Jan 2013 07:24:18 -0500 (EST) Received: by kwai.gnat.com (Postfix, from userid 4233) id 10FBD3FF09; Tue, 8 Jan 2013 07:24:18 -0500 (EST) From: Joel Brobecker To: gcc-patches@gcc.gnu.org Cc: Joel Brobecker Subject: [RFA/dwarf] Add DW_AT_use_GNAT_descriptive_type flag for Ada units. Date: Tue, 8 Jan 2013 07:24:14 -0500 Message-Id: <1357647854-27196-1-git-send-email-brobecker@adacore.com> 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 Hello, I just noticed that part of the proposal we made for... http://gcc.gnu.org/wiki/DW_AT_GNAT_descriptive_type ... got missed in the patch that got checked in: http://gcc.gnu.org/ml/gcc-patches/2011-04/msg00099.html In particular, we're missing the second part, where we are expected to generate a DW_AT_use_GNAT_descriptive_type flag in the CU in order to tell the consumers that we are providing the 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, no regression. I also tested against the GDB testsuite, before and after, and no regression. This is expected, since GDB currently does not look for this attribute (but I would like it to). OK to apply for HEAD and 4.7? Thanks, diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index a865250..8117ce9 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -18940,6 +18940,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_use_GNAT_descriptive_type, 1); + return die; }