[Dwarf-discuss] .debug_cu_index question

David Anderson davea42@linuxmail.org
Fri Dec 20 18:40:43 GMT 2024


Right. Thanks.  I will update and repost the document
to fix mistakes/lack-of-clarity. Possibly today.

On 12/20/24 10:05, David Blaikie wrote:
>
>
> On Fri, Dec 20, 2024 at 9:36 AM David Anderson via Dwarf-discuss <dwarf-
> discuss@lists.dwarfstd.org <mailto:dwarf-discuss@lists.dwarfstd.org>> wrote:
>
>
>     The examples of .debug_tu_index in DWARF5 Section F.2.3
>     show the hash as computed  by Type Signature Computation
>     Section 7.32 and referenced by DW_AT_LOCATION DW_FORM_ref_sig8.
>
>
> 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)
>
>     Ok. I was thinking of this incorrectly before. It's not
>     visible as a whole-CU index.  I think.
>     See pages 412, 413.
>
>
> I'm not sure what you mean by "visible as a whole-CU index" - could you
> speak more to this?
>
>     The examples of .debug_cu_index in DWARF5 Section F.2.3
>     do not really show where/how a calculated hash is used.
>
>
> 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).
>
>     Text on page 411, line 6 is relevant.
>
>     One example object I have on hand (not a recent
>     one) shows a CU header  signature
>     of   0x60ff5d2827dca832
>     and that same signature in a hash field in .debug_cu_index.
>     (the examples in DWARF5 do not mention the connection to
>     the CU header signature).
>
>
> 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
>
>
>     Would that mean .debug_cu_index just uses the CU header signature
>     by borrowing  a precomputed hash from the CU header?
>
>     That means      .debug_cu_index is a whole-CU index?
>
>
> .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)




More information about the Dwarf-discuss mailing list