[Lldb-commits] [lldb] [lldb] Do not use LC_FUNCTION_STARTS data to determine symbol size as symbols are created (PR #106791)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 3 20:43:56 PDT 2024


clayborg wrote:

We already have bits that know if the size is synthesize in `lldb_private::Symbol::m_size_is_synthesized` and we have a bit that tracks is the size is valid with `lldb_private::Symbol::m_size_is_valid`. We could accomplish this `size on demand` feature by letting clients subclass a special class that does this and is created and registered with the `Symtab` when it is created. Then any accesses to the `Symtab` class can be taught to check if a symbol's size is valid or not, and if it isn't check if the size can be calculated, and if so, call through to the new size helper class to complete the size of any symbols. ELF symbol tables would just not register a `size completion class`, but Mach-O would.

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


More information about the lldb-commits mailing list