From patchwork Tue Jan 8 12:24:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [RFA/dwarf] Add DW_AT_use_GNAT_descriptive_type flag for Ada units. X-Patchwork-Submitter: Joel Brobecker X-Patchwork-Id: 210357 Message-Id: <1357647854-27196-1-git-send-email-brobecker@adacore.com> To: gcc-patches@gcc.gnu.org Cc: Joel Brobecker Date: Tue, 8 Jan 2013 07:24:14 -0500 From: Joel Brobecker List-Id: 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; }