Issue 181026.2: Replace DW_FORM_strp_sup with strp_sup4 and strp_sup8
Author: | Paul Robinson |
---|---|
Champion: | Paul Robinson |
Date submitted: | 2018-10-26 |
Date revised: | |
Date closed: | 2021-11-01 |
Type: | Enhancement |
Status: | Withdrawn |
DWARF Version: | 6 |
Section Many, pg Many
Background:
DW_FORM_strp_sup represents an offset within the supplementary file. However, being a reference, the size of strp_sup depends on the DWARF-32/64 format of the section from which the reference is made, and it should instead accommodate the format of the section to which the reference is made. This is the same argument for why we have DW_FORM_ref_sup[4,8] instead of simply DW_FORM_ref_sup.
While compiling the set of specification changes for this issue, I discovered a related error: A sentence in section 7.5.5 (describing the 'string' class) describing what DW_FORM_strp_sup means within a supplementary object file, when section 7.3.6 says this form is not used in those files. The proposal below removes the sentence from section 7.5.5, assuming that the description in section 7.3.6 is correct.
Proposed specification changes:
Section 6.2.4.1 Standard Content Descriptions, p.158
In item 1 DW_LNCT_path, first paragraph, replace the sentence:
If the form code is DW_FORM_line_strp, DW_FORM_strp, or DW_FORM_strp_sup, then the string is included in the
.debug_line_str
,.debug_str
or supplementary string section, respectively, and its offset occurs immediately in the containingdirectories
orfile_names
field.
With this:
If the form code is DW_FORM_line_strp or DW_FORM_strp, then the string is included in the
.debug_line_str
or.debug_str
section, respectively; if the form code is DW_FORM_strp_sup4 or DW_FORM_strp_sup8, then the string is included in the supplementary string section; and in all these cases, the offset of the string within its section occurs immediately in the containing directoriesor
file_names` field.
Section 6.3.1 Macro Information Header, p.167
In the list of allowed forms, on line 10, replace "DW_FORM_strp_sup" with "DW_FORM_strp_sup4, DW_FORM_strp_sup8".
Section 7.3.6 DWARF Supplementary Object Files, p.195
On line 22, replace "DW_FORM_strp_sup" with "DW_FORM_strp_sup4 or DW_FORM_strp_sup8".
On line 25, replace "DW_FORM_strp_sup" with "DW_FORM_strp_sup4 or DW_FORM_strp_sup8".
After the paragraph ending on line 27, add a non-normative paragraph:
Forms for both 4- and 8-byte references are provided so that references may use the appropriate offset size for the content of the supplementary object file, which might not use the same 32-bit or 64-bit DWARF format as a referencing object file.
Section 7.4 32-Bit and 64-Bit DWARF Formats, p.197
In the table for item 3, remove the entry for DW_FORM_strp_sup.
Section 7.5.5 Classes and Forms, p.218
In the bullet item for class string, second sub-bullet (lines 20-30):
-
on line 24, replace the parenthetical (DW_FORM_strp_sup) with (DW_FORM_strp_sup4, DW_FORM_strp_sup8).
-
remove the next sentence, "DW_FORM_strp_sup offsets from ..." (this sentence describes a situation that is forbidden by Section 7.3.6).
-
on line 28, remove "DW_FORM_strp_sup" and editorially adjust as needed (so the sentence describes only DW_FORM_strp and DW_FORM_line_strp).
-
add a sentence at the end of this sub-bullet as follows: A supplementary string reference (DW_FORM_strp_sup4 or DW_FORM_strp_sup8) is a 4- or 8-byte offset (respectively) from the beginning of the
.debug_str
section in the supplementary object file.
Section 7.5.6, Form Encodings, Table 7.6
Remove (or mark as obsolete) the entry for DW_FORM_strp_sup (0x1d). Add entries for DW_FORM_strp_sup4 and DW_FORM_strp_sup8, both class string.
2021-10-04: Updated.
2021-11-01: Withdrawn; see Issue 211101.1