David,
DIRECTORIES:
The situation for directories seems pretty clear to me, and much the same as how
Philip saw it (I think). From 6.2.4, item 16 (page 157, lines 4-11):
The line number program assigns a number (index) to each of the directory
entries in order, beginning with 0.
Prior
February 18, 2020.
Lets see if we can get a complete picture of the
indexing into the line table header directory/file
names tables.
The conjecture at the end of this suggests that
all places with an actual file/directory number
or index should be 1-origin, reserving 0 to
mean no file named.
Th
> -Original Message-
> From: Dwarf-Discuss On Behalf
> Of Philip Craig via Dwarf-Discuss
> Sent: Monday, February 17, 2020 10:02 PM
> To: David Anderson
> Cc: dwarf-discuss@lists.dwarfstd.org
> Subject: Re: [Dwarf-Discuss] DW_AT_decl_file etc understood now
On Tue, 18 Feb 2020 at 10:40, David Anderson via Dwarf-Discuss
wrote:
>
> 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 tabl
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_de