[Lldb-commits] [PATCH] D47470: AppleDWARFIndex: Get function method-ness directly from debug info
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue May 29 10:00:01 PDT 2018
labath added inline comments.
Comment at: source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp:222
+ return true;
+ return GetReferencedDIE(DW_AT_specification)
> I can never remember when a DW_AT_abstract_origin might be used. Might be nice to have a DWARFDIE method:
> DWARFDIE DWARFDIE::GetAbstractOriginOrSpecification();
> this would return either the the DW_AT_specification or the DW_AT_abstract_origin. If we go that route the this coce would become:
How would this method know which DIE to return? In case of inlined methods you can have a chain of DIEs:
`DIE1 --- DW_AT_abstract_origin --> DIE2 --- DW_AT_specification --> DIE3`
Each of these dies will have a different parent.
The current function will check for the parent of DIE1 and DIE3 (this is what the manual index does) though to be fully correct maybe we should check all three of them (?) Or do you think checking the last DIE in that list should be always enough? That would seem to be the case for the dwarf I've seen, but I'm not sure if that is always correct..
More information about the lldb-commits