Issue 150731.1: Add new TAG for skeleton units

Author: Ron Brender
Champion: Ron Brender
Date submitted: 2015-07-31
Date revised:
Date closed:
Type: Improvement
Status: Withdrawn
DWARF Version: 5
Section Various, pg Various
This is an alternative proposal to 150702.1.  If this
proposal fails, that earlier proposal should be reconsidered.

The earlier proposal attempts to simplify case analysis and
improve consistency of the various kinds of compilation and 
type units by building on the existing unit_type field that 
was added to compilation units and type units in DWARF V5.

This proposal also seeks to simplify case analysis but in a
different manner--by defining a new TAG (DW_TAG_skeleton_unit)
to be used for skeleton compilation units, instead of 
reusing DW_TAG_compile_unit in an attribute dependent way.

Given a new TAG for skeleton units, for consistency we should 
add a new unit type code to correspond to the new kind of unit. 
(Some history on the origin of the unit type field is included
at the end, following this proposal.) 

Note that this proposal does not distinguish between normal and 
split variants of compilation and type units.



- In Table 2.1, add new entry:

- In S3.1.2/p62: In paragraph 1 change DW_TAG_compile_unit
to DW_TAG_skeleton_unit.

- In Table 7.2, add

    DW_UT_skeleton              0x04
- In Table 7.3, add new entry (just above DW_TAG_lo_user)

    DW_TAG_skeleton_unit        <next available, ~0x5a>
- In, replace the second sentence of bullet 3

    The value of this field is DW_UT_compile for a full compilation
    unit, DW_UT_partial for a partial compilation unit, or 
    DW_UT_skeleton for a skeleton compilation unit.

- In Appendix A, p252, add

    DW_TAG_skeleton_unit        DW_AT_addr_base
- In Appendix A, page 243: Remove DW_AT_dwo_name from the 
  entry for DW_AT_compile_unit.

- In Figure F.4, change DW_TAG_compile_unit to DW_TAG_skeleton_unit.

[end of proposal]
Some history regarding the unit_type field in .debug_info headers

When we adopted 130526.1, which merged type units back into
the .debug_info section (and eliminated the .debug_types section)
it was necessary to add a header field (unit_type) to be able 
to distinguish the two kinds of units for parsing/scanning purposes. 

130526.1 defined two cases, compilation units and type units, with
unit type codes 1 and 2, respectively. Type code 1 included both
DW_TAG_compile_unit and DW_TAG_partial_unit (recall skeleton/split
units did not exist then). We added type code 3 to cover partial
units, and defined names DW_UT_compile, DW_UT_type, and DW_UT_partial


05/17/2016 - Withdrawn (see 160108.1).