[Lldb-commits] [lldb] [lldb/DWARF] Search fallback to the manual index in GetFullyQualified… (PR #102123)

Felipe de Azevedo Piovezan via lldb-commits lldb-commits at lists.llvm.org
Mon Aug 12 09:00:43 PDT 2024


felipepiovezan wrote:

> The fallback index will only index those units that aren't covered by the debug_names index, so if debug_names covers everything, the fallback is a noop

Got it, this is what I was hoping that would happen! Thanks for explaining it.

(future ideas) This makes me wonder if a better design would have been to make whoever owns this instances of Index classes have instead a collection of these indices, instead of having an _implementation_ of an index have to remember to call a fallback mechanism.
To answer this question with another question: since Index classes are not allowed to have false negatives / positives, we would never need more than one index (for a give CU). Which begs the question of why we have a design that allows us to reach the problem this PR is fixing? It feels off that we have two objects: a manual index and a dwarf index, and that the dwarf index has to remember to call the manual index when the dwarf index is empty.

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


More information about the lldb-commits mailing list