Re: [Dwarf-Discuss] DWARF v5 and "file 0"

2021-07-09 Thread Paul Robinson via Dwarf-Discuss
> it sounds like the general consensus is that: > > * In DWARF 5, file name entries are zero-indexed. > * DW_AT_decl_file of 0 means the first file name entry (index 0, which > happens to be the same as DW_AT_name of the unit). It does NOT mean an > unspecified file; that was an oversight in t

Re: [Dwarf-Discuss] DWARF v5 and "file 0"

2021-07-08 Thread Omar Sandoval via Dwarf-Discuss
On Thu, Jul 08, 2021 at 03:36:24PM -0700, David Anderson via Dwarf-Discuss wrote: > 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

Re: [Dwarf-Discuss] DWARF v5 and "file 0"

2021-07-08 Thread David Anderson via Dwarf-Discuss
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" registe

Re: [Dwarf-Discuss] DWARF v5 and "file 0"

2021-07-08 Thread Omar Sandoval via Dwarf-Discuss
On Thu, Jul 08, 2021 at 07:23:14PM +, Paul Robinson via Dwarf-Discuss wrote: > Tom Russell asked me about this, and I think it's a bug in the > v5 specification. Coincidentally, I just joined this list to ask about the same thing, as I am currently implementing DWARF 5 support in my debugger.

[Dwarf-Discuss] DWARF v5 and "file 0"

2021-07-08 Thread Paul Robinson via Dwarf-Discuss
Tom Russell asked me about this, and I think it's a bug in the v5 specification. In v5, the line-table header's directory table added an entry for directory 0. Previous versions had directory 0 mean the current compilation directory, i.e. DW_AT_comp_dir from the compile unit DIE. The file table