<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Fri, Dec 20, 2024 at 9:36 AM 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"><br>
The examples of .debug_tu_index in DWARF5 Section F.2.3<br>
show the hash as computed by Type Signature Computation<br>
Section 7.32 and referenced by DW_AT_LOCATION DW_FORM_ref_sig8.<br></blockquote><div><br>do you mean DW_AT_signature, rather than DW_AT_location? (I don't think I've seen/heard of DW_AT_location+DW_FORM_ref_sig8)<br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Ok. I was thinking of this incorrectly before. It's not<br>
visible as a whole-CU index. I think.<br>
See pages 412, 413.<br></blockquote><div><br></div><div>I'm not sure what you mean by "visible as a whole-CU index" - could you speak more to this?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The examples of .debug_cu_index in DWARF5 Section F.2.3<br>
do not really show where/how a calculated hash is used.<br></blockquote><div><br>If you're looking for info on the cu/tu_index, the wording you're looking for is "package files" (F.3 DWARF package file example, and 7.3.5 for instance).<br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Text on page 411, line 6 is relevant.<br>
<br>
One example object I have on hand (not a recent<br>
one) shows a CU header signature<br>
of 0x60ff5d2827dca832<br>
and that same signature in a hash field in .debug_cu_index.<br>
(the examples in DWARF5 do not mention the connection to<br>
the CU header signature).<br></blockquote><div><br>I believe they all refer to it as the "compilation unit ID" both in the description of the dwo_id field in the (skeleton and split full) unit header and in the documentation for the index/packaging format <br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Would that mean .debug_cu_index just uses the CU header signature<br>
by borrowing a precomputed hash from the CU header?<br>
<br>
That means .debug_cu_index is a whole-CU index?<br></blockquote><div><br>.debug_cu_index provides an index for all CUs in the .dwp file, yes. (which should contain split full units for all the skeleton units in the matched binary)<br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<br>
<br>
<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></div>