[Dwarf-Discuss] Inconsistency in DWARF length escape codes

Michael Eager eager@eagercon.com
Tue Jun 24 13:54:48 GMT 2008


Resolution is that the correct value is 0xfffffff0.
See minutes of 2/29/2008.   (I should have recorded this
as an open issue.)

Ron Brender wrote:
> What was the resolution of this question? I agree that it is merely a 
> typo. I note that
> 
>   - there is  one  occurrence  of 0xfffffff0
>   - there are four occurrences of 0xffffff00
> 
> This suggests that the typo is in the first case (0xfffffff0 should be 
> 0xffffff00).
> 
> Shall I go ahead and make that correction? Or does someone want to 
> debate whether we need 16 vs 256 escape codes? (IMHO 16 is undoubtedly 
> enough, but it is outvoted 4 to 1. :-)
> 
> FWIW, in searching my archives I was unable to find the original 
> proposal we adopted that established the escape scheme way back when...
> 
> Ron
> 
> --------------------
> Michael Eager wrote:
>> Nick Clifton wrote:
>>> 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 ?
>>
>> I think that you found a typo.  The values should all be the same.
>> (It also points out that the DWARF standard should have only one place
>> where each value is defined.)
>>
>> I don't recall the rationale for the range of reserved values.  But
>> I think that your question about whether 16 reserved values are adequate
>> is reasonable.  I don't see a need for more.
>>
> 
> 
> 


-- 
Michael Eager	 eager at eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077




More information about the Dwarf-discuss mailing list