[Dwarf-Discuss] DWARF v5 and "file 0"
Thu Jul 8 22:36:24 GMT 2021
On 7/8/21 12:23 PM, Paul Robinson via Dwarf-Discuss wrote:
> The file table also added an entry for file 0, claiming that it
> similarly used to mean the primary compilation file. I can't find
> any evidence that was actually true, though; the default value for
> the line-number program's "file" register was (and still is) 1, not
> 0, and in fact section 2.14 says that DW_AT_decl_file = 0 means
> there is no source file (analogous to line 0 meaning no specific
> source line).
"DWARF5 Line Table File Numbers"
in the dwarfstd.org wiki
explains the basic contradiction in DWARF5
file numbering. It's impossible to
obey the standard as written.
Likely the best way around
the contraction in DWARF5
is to declare the special
value of 0 ( in section 2.14)
as invalid and erase it.
(See the wiki entry
for more details).
DWARF4 has no such contradiction.
"Half silk, half cotton, half linen. How can you go wrong?"
-- Jerry, describing his shirt, in Seinfeld, "The Sniffing Accountant"
More information about the Dwarf-discuss