[Dwarf-discuss] Does DWARF 5 specify which DW_LNCT content types are valid for directory entries?

David Blaikie dblaikie@gmail.com
Mon Jan 13 19:35:51 GMT 2025


On Mon, Jan 13, 2025 at 10:45 AM David Anderson via Dwarf-discuss <
dwarf-discuss@lists.dwarfstd.org> wrote:

> On 1/13/25 07:17, John DelSignore via Dwarf-discuss wrote:
> > Hi,
> >
> > Section 6.2 (Line Number Information) of the DWARF 5 spec does not seem
> to constrain which DW_LNCT content types are valid for directory entries,
> or at least I couldn't find where it does.
> >
> > Are DW_LNCT_directory_index, DW_LNCT_timestamp, DW_LNCT_size, and/or
> DW_LNCT_MD5 content types valid for directory entries? If so, what do they
> mean? If not, perhaps each of the DW_LNCT content types should explicitly
> state where it's valid.
> >
> > Cheers, John D.
>
> Version 5 page 157 Sec 6.2.4
> "20.file_names (sequence of file name entries)
> A sequence of file names and optional related information. Each entry is
> encoded as described by the file_name_entry_format field.
>
> Entries in this sequence describe source files that
> contribute to the line
> number information for this compilation or
> is used in other contexts, such as
> in a declaration coordinate or a macro file inclusion."
>
> I think this means that file names are file names, not
> directory names. Even if a directory contains only
> one file, there is no hint of implied search of a directory
> in the file_names list.
>

I guess Jon is referring to the  16th field in the header, "directories
(sequence of directory names)" which uses the same encoding system (but a
separate format field, so the directories can have different active fields
than the files) and there doesn't seem to be a list of what's suitable in
one and not the other.

I don't feel too strongly about it - if someone finds a use case for
putting the more file-centric attributes on directories, I guess more power
to them? But equally having advice/suggestions if it helps someone seems
fine too...

Jon - was/is it a source of confusion for you/others?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dwarfstd.org/pipermail/dwarf-discuss/attachments/20250113/74baba31/attachment-0001.htm>


More information about the Dwarf-discuss mailing list