[Dwarf-Discuss] Question about template parameter pack debug info

Dodji Seketeli dodji at redhat.com
Thu Sep 3 07:55:58 PDT 2009


Hello,

I am looking at
http://www.dwarfstd.org/ShowIssue.php?issue=090107.2&type=closed3 and I
would have a question concerning [5.6.8] "Class Template Instantiations".

The proposal says:

"Each argument within the template parameter pack can have one of the tags
DW_TAG_template_type_parameter or DW_TAG_template_value_parameter, and will
have same form as other template parameter entries. These entries follow
immediately after the debugging information entry with the tag
DW_TAG_template_parameter_pack, and are owned by the same parent entry."

But then the example accompanying that statement shows:

13$:      DW_TAG_template_parameter_pack
              DW_AT_name("PackTypes")
14$:          DW_TAG_template_type_parameter
                  DW_AT_type(reference to base type "short")
15$:          DW_TAG_template_type_parameter
                  DW_AT_type(reference to base type "int")

where in 14$ and 15$, the DW_TAG_template_type_parameter are children DIEs
of the DW_TAG_template_pack rather than being siblings as I would have
expected from the wording "These entries follow immediately after the
debugging information entry with the tag
DW_TAG_template_parameter_pack, and are owned by the same parent entry".

So are the DW_TAG_template_*_parameter DIEs children or siblings of the
DW_TAG_template_parameter_pack DIE ?

Please note that for function template parameter packs, a similar "follow
immediately" wording is illustrated by an example where the relevant DIEs
are siblings of the pack DIE, rather than being children.

Thanks.

-- 
Dodji Seketeli
Red Hat



More information about the Dwarf-Discuss mailing list