Issue 130722.2: List template parameters in declaration order

Author: Paul Robinson
Champion: Paul Robinson
Date submitted: 2013-07-22
Date revised:
Date closed:
Type: Improvement
Status: Accepted
DWARF Version: 5
Section 5.5.8, pg 94

DWARF currently specifies that formal_parameter entries must appear in the same order
as they appear in the source program.  However it does not say anything about the
order of template_type_parameter and template_value_parameter entries.

A producer can emit a class instantiation with a name that is the same as the class
template; see Appendix D.11 and D.12.  In order for the debugger to reconstruct the
correct full type name (with template actual parameters), the template parameter
entries must be in source declaration order.

Add the following paragraph to the end of section 5.5.8:

The DW_TAG_template_type_parameter and DW_TAG_template_value_parameter entries
appear in the same order as the corresponding template formal parameter declarations
in the source program.


Accepted: 10/23/2013.