Introduction

For debugging Ada, part of the information that the debugger requires is stored in parallel types (artificial types created in parallel to the entities we wish to describe). The name of these types follows an encoding which is documented in gcc/ada/exp_dbug.ads.

The upside with this approach is that it allows us to describe any of the Ada entities, including the most complex ones: variant records (structs whose definition and size may change depending on context), variable-size arrays, renamings, etc. The downside is that it requires frequent global lookups, which is expensive when debugging large applications.

New DWARF Attribute: DW_AT_GNAT_descriptive_type

A new GNU-specific attribute was introduced to solve this problem when using DWARF: DW_AT_GNAT_descriptive_type.

This new attribute makes the parallel-type lookup instantaneous, as this attribute is used to point to the DIE of the corresponding parallel type (there is always only one, or else they are chained in the logical order). Absence of this attribute means that there is no parallel type needed to describe it.

New DWARF Attribute: DW_AT_GNAT_use_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_GNAT_use_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.

None: DW_AT_GNAT_descriptive_type (last edited 2014-02-04 02:01:11 by brobecke)