debuginfo: Generate DW_TAG_template_type_parameter DIEs for generic types #9224

Open
michaelwoerister opened this Issue Sep 16, 2013 · 3 comments

Projects

None yet

3 participants

@michaelwoerister
Contributor

Section 5.5.8 Class Template Instantiations of the DWARF 4 standard says:

A class template instantiation is represented by a debugging information entry with the tag DW_TAG_class_type, DW_TAG_structure_type or DW_TAG_union_type. With five exceptions, such an entry will contain the same attributes and have the same types of child entries as would an entry for a class type defined explicitly using the instantiation types and values.

and later (two of the five mentioned exceptions):

Each formal parameterized type declaration appearing in the template definition is
represented by a debugging information entry with the tag DW_TAG_template_type_parameter. [...]

The class type entry and each of its child entries references a template type parameter entry in any circumstance where the source template definition references a formal parameterized type. [...]

These things are not done yet: For generic types we describe their monomorphized version, losing the information that they stem from a generic definition. In order to fix this issue, the following two things need to be done:

  1. Create DW_TAG_template_type_parameter metadata entries for each generic parameter like already done for generic functions.
  2. Reference these metadata entries where they are use in the type definition---instead of directly referencing the type they have been substituted by.
@flaper87
Contributor

Triage bump... Nothing has been done here yet.

@steveklabnik
Contributor

Triage: still no change

@steveklabnik
Contributor

Triage: no change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment