dwblaikie wrote:

As for the original issue this patch is meant to address - I'd still like to 
see an example of the problem, as I'm not sure what the issue is. (but, 
equally, I'm not a decider in lldb - so don't have to wait on my for approval 
if other lldb devs reckon this is the right direction)

> "std::ios_base" is forward declared and it contains typedefs whose entries in 
> the .debug_names table will point to the DIE at offset 0x0090cdd5. These 
> entries cause our type lookups to try and parse a TON of forward declarations 
> and waste time and resources.

Yeah, so far as I know if the parent of the typedef isn't indexed (because it's 
a declaration that isn't a definition) we don't put a DW_IDX_parent on the 
typedef.

It wouldn't be totally wrong for a producer to do this, though they shouldn't 
put the declaration of the enclosing/outer type in a /named/ entry, just in an 
unnamed index entry.

But if they did, why would that cause bad performance? The name lookup should 
check the referenced parent DIE to see what its name is - why would there be a 
lookup of everything with that name?

Or you mean all these declarations end up in the table, and any lookup for the 
name is inefficient because it finds lots of declarations so there's just loads 
more results than we want?

Yeah - if some producer did mistakenly put declarations in named entries in the 
debug_names table, that'd be bad - filtering them out in the debugger's not the 
worst thing, or just erroring out & saying the table's bogus (maybe ignoring 
the table entirely). Not sure.

https://github.com/llvm/llvm-project/pull/91808
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to