<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><font color="#000000"><span style="caret-color: rgb(0, 0, 0);">David has pretty much summed it up, but to restate: </span></font><br><div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br></div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">When we implemented this, we had to be able to distinguish the two cases below:</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">1. there are no IDX_parent in an accelerator table because the producer did not generate them.</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">2. there are no IDX_parent in an accelerator table because the parent is not indexed.</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br></div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">Case 1 is represented by the absence of IDX_parent, whereas Case 2 is captured by the "flag_present" case.</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">We also needed case 2 to be space-efficient, which is accomplished through the use of a Form that has no data associated with it (other than its abbreviation entry).</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br></div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">There is more context on this in the thread below.</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><a href="https://discourse.llvm.org/t/rfc-improve-dwarf-5-debug-names-type-lookup-parsing-speed/74151/42">https://discourse.llvm.org/t/rfc-improve-dwarf-5-debug-names-type-lookup-parsing-speed/74151/42</a></div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br></div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">Maybe this is something we could submit for standardization?</div><div><br><blockquote type="cite"><div>On Sep 3, 2024, at 15:05, Adrian Prantl via Dwarf-discuss <dwarf-discuss@lists.dwarfstd.org> wrote:</div><br class="Apple-interchange-newline"><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">CC'ing Felipe Piovezan, who implement this feature, in case he wants to fill in more details.<div><br></div><div>-- adrian<br id="lineBreakAtBeginningOfMessage"><div><br><blockquote type="cite"><div>On Sep 3, 2024, at 10:06 AM, David Blaikie via Dwarf-discuss <dwarf-discuss@lists.dwarfstd.org> wrote:</div><br class="Apple-interchange-newline"><div><div dir="ltr">Some context:<br><a href="https://discourse.llvm.org/t/rfc-improve-dwarf-5-debug-names-type-lookup-parsing-speed/74151/44">https://discourse.llvm.org/t/rfc-improve-dwarf-5-debug-names-type-lookup-parsing-speed/74151/44</a><br><a href="https://github.com/llvm/llvm-project/pull/77457">https://github.com/llvm/llvm-project/pull/77457</a><br><br>Essentially clang/llvm produces DW_IDX_parent with DW_FORM_flag_present when the entry has a parent, but that parent isn't indexed (I think this mostly comes up for the entities that are direct children of the unit DIE).<br><br>This is designed to make it more efficient for consumers (lldb, in particular) to do quicker comparisons from the index for qualified names.<br><br>My vague recollection is the idea that the consumer needs that info to know the difference between "this thing may or may not have a parent" and "this thing has an unnamed/unindexed parent".<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Aug 31, 2024 at 1:03 PM David Anderson via Dwarf-discuss <<a href="mailto:dwarf-discuss@lists.dwarfstd.org">dwarf-discuss@lists.dwarfstd.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Dwarf5. The Name Table .debug_names<br>
<br>
Background:<br>
6.1.1.2, page 141<br>
Parent debugging information entry, a reference to the<br>
index entry for the parent. This is represented as the<br>
offset of the entry relative to the start of the entry<br>
pool.<br>
<br>
Table 7.232 Name index attribute encodings<br>
       DW_IDX_parent constant<br>
<br>
<br>
However clang version 18.1.8 generates<br>
<br>
DW_IDX_parent      DW_FORM_flag_present<br>
when there is no parent entry to refer to.<br>
<br>
And that does not seem to match what DWARF5<br>
says to do.<br>
<br>
So what is 'true' supposed to mean for DW_IDX_parent?<br>
<br>
A bit puzzled here.<br>
Thanks for any insight.<br>
David Anderson<br>
<br>
--<br>
Lisp Users: Due to the holiday next<br>
Monday, there will be no garbage<br>
collection. --seen on Slashdot<br>
-- <br>
Dwarf-discuss mailing list<br>
<a href="mailto:Dwarf-discuss@lists.dwarfstd.org" target="_blank">Dwarf-discuss@lists.dwarfstd.org</a><br>
<a href="https://lists.dwarfstd.org/mailman/listinfo/dwarf-discuss" rel="noreferrer" target="_blank">https://lists.dwarfstd.org/mailman/listinfo/dwarf-discuss</a><br>
</blockquote></div>
-- <br>Dwarf-discuss mailing list<br>Dwarf-discuss@lists.dwarfstd.org<br>https://lists.dwarfstd.org/mailman/listinfo/dwarf-discuss<br></div></blockquote></div><br></div></div>-- <br>Dwarf-discuss mailing list<br>Dwarf-discuss@lists.dwarfstd.org<br>https://lists.dwarfstd.org/mailman/listinfo/dwarf-discuss<br></div></blockquote></div><br></div></body></html>