[Dwarf-discuss] Question on Clang 18.1.8 and DW_IDX_parent
Adrian Prantl
aprantl@apple.com
Tue Sep 3 22:05:31 GMT 2024
CC'ing Felipe Piovezan, who implement this feature, in case he wants to fill in more details.
-- adrian
> On Sep 3, 2024, at 10:06 AM, David Blaikie via Dwarf-discuss <dwarf-discuss@lists.dwarfstd.org> wrote:
>
> Some context:
> https://discourse.llvm.org/t/rfc-improve-dwarf-5-debug-names-type-lookup-parsing-speed/74151/44
> https://github.com/llvm/llvm-project/pull/77457
>
> 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).
>
> This is designed to make it more efficient for consumers (lldb, in particular) to do quicker comparisons from the index for qualified names.
>
> 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".
>
> On Sat, Aug 31, 2024 at 1:03 PM David Anderson via Dwarf-discuss <dwarf-discuss@lists.dwarfstd.org <mailto:dwarf-discuss@lists.dwarfstd.org>> wrote:
>> Dwarf5. The Name Table .debug_names
>>
>> Background:
>> 6.1.1.2, page 141
>> Parent debugging information entry, a reference to the
>> index entry for the parent. This is represented as the
>> offset of the entry relative to the start of the entry
>> pool.
>>
>> Table 7.232 Name index attribute encodings
>> DW_IDX_parent constant
>>
>>
>> However clang version 18.1.8 generates
>>
>> DW_IDX_parent DW_FORM_flag_present
>> when there is no parent entry to refer to.
>>
>> And that does not seem to match what DWARF5
>> says to do.
>>
>> So what is 'true' supposed to mean for DW_IDX_parent?
>>
>> A bit puzzled here.
>> Thanks for any insight.
>> David Anderson
>>
>> --
>> Lisp Users: Due to the holiday next
>> Monday, there will be no garbage
>> collection. --seen on Slashdot
>> --
>> Dwarf-discuss mailing list
>> Dwarf-discuss@lists.dwarfstd.org <mailto:Dwarf-discuss@lists.dwarfstd.org>
>> https://lists.dwarfstd.org/mailman/listinfo/dwarf-discuss
> --
> Dwarf-discuss mailing list
> Dwarf-discuss@lists.dwarfstd.org
> https://lists.dwarfstd.org/mailman/listinfo/dwarf-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dwarfstd.org/pipermail/dwarf-discuss/attachments/20240903/a7654e1e/attachment.htm>
More information about the Dwarf-discuss
mailing list