This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA] Add new DW_AT_use_GNAT_descriptive_type CU attribute.


Hello,

We recently checked in an extension for Ada: DW_AT_GNAT_descriptive_type.
When in use, this attribute serves two purposes:
  1. If specified, then there is a parallel type, and this attribute
     points to the DIE of this parallel type;
  2. If NOT specified, then there is no parallel type, and searching one
     is not necessary.

The issue that was left to discussion at the time was how can the compiler
tell the consumers that this attribute is in use (or not)?  The solution
was to add a new attribute used in the DW_TAG_compilation_unit DIE.
I updated the DW_AT_GNAT_descriptive_type to describe this new attribute:

    http://gcc.gnu.org/wiki/DW_AT_GNAT_descriptive_type

> New DWARF Attribute: DW_AT_use_GNAT_descriptive_type
>
> A new GNU-specific attribute was also introduced to help consumers
> determine whether a given Compilation Unit provides descriptive-type
> information or not: DW_AT_use_GNAT_descriptive_type.
>
> This new attribute, used in DW_TAG_compile_unit DIEs, is a flag whose
> presence indicate that GNAT descriptive-type information is available.

The attached patch adds this new attribute.

include/ChangeLog:

        Add new DW_AT_use_GNAT_descriptive_type CU attribute.
        * dwarf2.h (dwarf_attribute): Add DW_AT_use_GNAT_descriptive_type.

I rebuilt GDB without error after having added this attribute.
OK to apply?

Thank you,
---
 include/dwarf2.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/dwarf2.h b/include/dwarf2.h
index a001ef3..303af70 100644
--- a/include/dwarf2.h
+++ b/include/dwarf2.h
@@ -428,6 +428,7 @@ enum dwarf_attribute
     /* GNAT extensions.  */
     /* GNAT descriptive type.
        See http://gcc.gnu.org/wiki/DW_AT_GNAT_descriptive_type .  */
+    DW_AT_use_GNAT_descriptive_type = 0x2301,
     DW_AT_GNAT_descriptive_type	= 0x2302,
     /* UPC extension.  */
     DW_AT_upc_threads_scaled = 0x3210,
-- 
1.6.3.3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]