[Dwarf-Discuss] Inconsistency in DWARF length escape codes
Nick Clifton
nickc@redhat.com
Fri Jan 4 08:59:03 GMT 2008
Hi Guys,
There appears to be an inconsistency in the DWARF3 specification for the
range of values that can be used as escape codes in the initial 4-byte length
field of some headers:
In section 7.2.2 (Initial Length Values) on page 120 of the DWARF3 spec
(published Dec 20, 2005 and downloaded from http://dwarfstd.org) it says:
"In an initial length field, the values 0xfffffff0 through
0xffffffff are reserved by DWARF to indicate some form of
extension relative to DWARF Version 2; such values must
not be interpreted as a length field."
Note that the start value has seven 'f's and only one 0. On the next page
however (Section 7.4 32-Bit and 64-Bit DWARF Formats) in item 1 it says:
"In the 32-bit DWARF format, an initial length field (see
Section 7.2.2) is an unsigned 32-bit integer (which must
be less than 0xffffff00);"
This time the reserved value has six 'f's and two 0's. This smaller value is
also referred to in Section 7.5.1, Section 7.19 and Section 7.20.
It would appear that Section 7.2.2 contains a typo and that the lower reserved
value ought to be 0xffffff00. On the other hand is there really a need for
256 escape codes ? Maybe the other sections are wrong and their lower limits
should be changed to 0xfffffff0 ?
What do you think ?
Cheers
Nick
More information about the Dwarf-discuss
mailing list