Issue 140331.2: Add file attributes to debug-line file table
Section 6.2.4, 6.2.5, pg 115
Issue 130701.1 adds a fixed file_entry_format (ubyte) field that just allows one attribute
(group) to be defined. Which isn't vendor extensible. Instead of such a fixed file attribute
I propose to adopt the approach of the .debug_macro proposal 110722.1 to make the attributes
attached to a file entry producer described to allow extending the number of attributes in
later DWARF versions or as vendor extensions and give consumers a way to skip over
any unknown attributes.
Add the following to Section 6.2.4 "The Line Number Program Header" based on the text in
Issue 130701.1:
file_attributes (ubyte)
- Possibly zero, number of attributes added to each file in the
file_names table.
file_attribute_description (sequence of attribute descriptions)
- Entries in this description describe which attributes and in what
format those attributes are encoded for each file entry. It has
file_attributes entries. Each entry consists of:
- file_attribute (ubyte). One of DW_LNF_timestamp,
DW_LNF_length, DW_LNF_MD5, ...
- file_attribute_format. A uleb128 describing the number of
arguments for the format followed a single byte describing the
form of the argument. The allowed values are DW_FORM_data1,
DW_FORM_data2, DW_FORM_data4, DW_FORM_data8, DW_FORM_sdata, DW_FORM_udata,
DW_FORM_block, DW_FORM_block1, DW_FORM_block2, DW_FORM_block4, DW_FORM_flag,
DW_FORM_string, DW_FORM_strp and DW_FORM_sec_offset.
file_names (sequence of file entries)
- Each entry consists of the following values:
- A null-terminated string containing the full or relative path name
of a source file.
- An unsigned LEB128 number representing the directory index of a
directory in the include_directories section.
- For each file_attribute_format described in the
file_attribute_description entries the value encoded in the format
given by file_attribute_format.
For example DW_LNF_timestamp and DW_LNF_length would have as format 1
DW_FORM_udata. DW_LNF_MD5 could by described by 2 DW_FORM_data8.
The constants as defined and used in Issue 130701.1 can be reused in the above.
--
7/15/2014 -- Accepted
8/19/2014 -- Reconsidered and rejecte. Replaced with 140724.1.