A bit of thought, and it becomes clear. Since 0 is a reserved
(and always has been)
value for DW_AT_decl_file the numbers used by the compiler
must start at 1.

So to index into the array of names from the line table header
make sure your value is greater than zero and
subtract 1 from the DW_AT_decL_file.

With DWARF5 the file numbered 1 has to be the file of the compilation unit
(same as DW_AT_name of the compilation unit).

With earlier DWARF the file numbered  is some other file referenced
by that compilation unit.

Soon dwarfdump  -v -v -v  will print a full and accurate listing
of all the fields in a DWARF5 line table header (right now it
hides much of the DWARF5 line table header detail).

DavidA.
_______________________________________________
Dwarf-Discuss mailing list
Dwarf-Discuss@lists.dwarfstd.org
http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org

Reply via email to