[Lldb-commits] [lldb] Improve performance of .debug_names lookups when DW_IDX_parent attributes are used (PR #91808)

Felipe de Azevedo Piovezan via lldb-commits lldb-commits at lists.llvm.org
Fri May 10 20:52:09 PDT 2024


felipepiovezan wrote:

> > we should probably fix the underlying issue instead: #77696
> 
> We still have binaries that are floating around for now that contain this issue and this was causing crashes. So it would be nice to fix this in LLDB for now and back this out after we have a stable and trustable .debug_names section?

That's ok by me, but I still don't understand how the problem being solved here is related to IDX_parent. As I said in the email you quoted, we don't add links to parents that are forward declarations. When the parent chain of a DIE is built, if we see an `AT_declaration` (just like what is being done in this PR), we pretend the parent is not indexed. In other others, the queries involving IDX_parent will _never_ reach the ProcessEntry function.

Note that only `DebugNamesDWARFIndex::GetFullyQualifiedType` makes use of IDX_parent, but there are tons of other queries that call `ProcessEntry`. Maybe the slow path you are reaching is from one of those other queries?

https://github.com/llvm/llvm-project/pull/91808


More information about the lldb-commits mailing list