[Lldb-commits] [lldb] [LLDB] Omit loading local symbols in LLDB symbol table (PR #154809)
David Peixotto via lldb-commits
lldb-commits at lists.llvm.org
Tue Aug 26 09:59:08 PDT 2025
================
@@ -2102,6 +2121,12 @@ ObjectFileELF::ParseSymbols(Symtab *symtab, user_id_t start_id,
if (!symbol_name)
symbol_name = "";
+ // Skip local symbols starting with ".L" because these are compiler
+ // generated local labels used for internal purposes (e.g. debugging,
+ // optimization) and are not relevant for symbol resolution or external
+ // linkage in RISC-V binaries.
+ if (symbol_name[0] == '.' && symbol_name[1] == 'L')
----------------
dmpots wrote:
This is going to read out of bounds on an empty string. Let's try something like this instead: `llvm::StringRef(symbol_name).startswith(".L")`
https://github.com/llvm/llvm-project/pull/154809
More information about the lldb-commits
mailing list