<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p>In-line below...</p>
<div class="moz-cite-prefix">On 1/13/25 20:10, David Anderson via Dwarf-discuss wrote:<br>
</div>
<blockquote type="cite" cite="mid:b0d50339-7c27-460c-9ac1-63a0f3d8b5c4@gmail.com">
On 1/13/25 11:35, David Blaikie via Dwarf-discuss wrote: <br>
<blockquote type="cite">I guess Jon is referring to the 16th field in the header, "directories
<br>
(sequence of directory names)" which uses the same encoding system (but <br>
a separate format field, so the directories can have different active <br>
fields than the files) and there doesn't seem to be a list of what's <br>
suitable in one and not the other. <br>
</blockquote>
</blockquote>
<p>Yes, the above is exactly what I was referring to...</p>
<p>Clearly, all of the content type codes apply to files. In section 6.2.4.1, the meaning of each content type code is defined for
<u>files</u>.<br>
</p>
<p>However, other than DW_LNCT_path, the spec does not say whether or not the remaining content type codes do or do not apply to
<u>directories</u>.</p>
<blockquote type="cite" cite="mid:b0d50339-7c27-460c-9ac1-63a0f3d8b5c4@gmail.com">
<blockquote type="cite"><br>
I don't feel too strongly about it - if someone finds a use case for <br>
putting the more file-centric attributes on directories, I guess more <br>
power to them? But equally having advice/suggestions if it helps someone <br>
seems fine too... <br>
</blockquote>
<br>
My bad. John was quite precise in the question... but I misread it. <br>
<br>
Seems to me that the types defined in 6.2.4.1 Standard Content <br>
Descriptions are not all required. Optional. <br>
<br>
DW_LNCT_directory_index is odd on a directory <br>
though an opportunity for a compiler <br>
to create nested references and an infinite loop of directory references <br>
(which would be caught immediately in testing). <br>
<br>
DW_LNCT_timestamp is meaningless on a directory? So don't use it. <br>
DW_LNCT_MD5 is meaningless on a directory too? Again, simply don't use it. <br>
</blockquote>
<p>Think of it from a third-party consumer point of view. Our debugger consumes DWARF from many different producers (GNU, LLVM, etc.). If a compiler produces something, like DW_LNCT_directory_index on a directory, I'd like the DWARF spec to tell me what it
means. I don't want to have to guess what it means. Also, different producers might decide it means something different.</p>
<p>IMHO, the point of a spec is to specify exactly what something means, and the permissive nature of the DWARF spec is as much a weakness as a strength.</p>
<blockquote type="cite" cite="mid:b0d50339-7c27-460c-9ac1-63a0f3d8b5c4@gmail.com">
<br>
The whole point of the DW_LNCT was to make the fields <br>
optional, I seem to recall. Of course without <br>
DW_LNCT_path an entry would be useless. <br>
</blockquote>
<p>Yes, optional for files (other than DW_LNCT_path) makes sense.</p>
<p>The thing that does not make sense is for the spec to not say what is valid vs. invalid. FWIW, I like the rigor that AMD used in their DWARF Extensions For Heterogeneous Debugging. For example, related to this discussion, it defines DW_LNCT_LLVM_source:<br>
</p>
<p><a class="moz-txt-link-freetext" href="https://llvm.org/docs/AMDGPUDwarfExtensionsForHeterogeneousDebugging.html#id79">https://llvm.org/docs/AMDGPUDwarfExtensionsForHeterogeneousDebugging.html#id79</a><br>
</p>
<p>It includes the sentence, "It can be used for file name entries." That's good, but even better would be for it to say, "It can be used for file name entries, but not directory entries."</p>
<p>Cheers, John D.<br>
</p>
<p><br>
</p>
<blockquote type="cite" cite="mid:b0d50339-7c27-460c-9ac1-63a0f3d8b5c4@gmail.com">
<br>
DavidA <br>
<br>
-- <br>
If it weren't for Philo T. Farnsworth, inventor <br>
of television, we'd still be eating frozen radio <br>
dinners. -- Johnny Carson <br>
-- <br>
Dwarf-discuss mailing list <br>
<a class="moz-txt-link-abbreviated" href="mailto:Dwarf-discuss@lists.dwarfstd.org">Dwarf-discuss@lists.dwarfstd.org</a>
<br>
<a class="moz-txt-link-freetext" href="https://lists.dwarfstd.org/mailman/listinfo/dwarf-discuss">https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.dwarfstd.org%2Fmailman%2Flistinfo%2Fdwarf-discuss&data=05%7C02%7Cjdelsignore%40perforce.com%7Ca826bab442ff4780428608dd3438475f%7C95b666d19a7549ab95a38969fbcdc08c%7C0%7C0%7C638724138517911752%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=jJzqeO%2FQQFHdwOwdzSwruwzrfl7T1ohhcrA3ZgIOzkw%3D&reserved=0</a>
<br>
<br>
<br>
CAUTION: This email originated from outside of the organization. Do not click on links or open attachments unless you recognize the sender and know the content is safe.
<br>
</blockquote>
<br>
<p><span style="font-size:8.0pt;color:#A6A6A6;font-style:italic">This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.</span></p>
<br>
</body>
</html>