[Lldb-commits] [lldb] [LLDB][NativePDB] Find functions by basename (PR #152295)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Fri Aug 8 09:54:23 PDT 2025
================
@@ -1641,6 +1642,94 @@ void SymbolFileNativePDB::DumpClangAST(Stream &s, llvm::StringRef filter) {
clang->GetNativePDBParser()->Dump(s, filter);
}
+void SymbolFileNativePDB::CacheFunctionNames() {
+ if (!m_func_full_names.IsEmpty())
+ return;
+
+ // (segment, code offset) -> gid
+ std::map<std::pair<uint16_t, uint32_t>, uint32_t> addr_ids;
+
+ // First, find all function references in the globals table.
+ for (const uint32_t gid : m_index->globals().getGlobalsTable()) {
+ CVSymbol ref_sym = m_index->symrecords().readRecord(gid);
+ auto kind = ref_sym.kind();
+ if (kind != S_PROCREF && kind != S_LPROCREF)
+ continue;
+
+ ProcRefSym ref =
+ llvm::cantFail(SymbolDeserializer::deserializeAs<ProcRefSym>(ref_sym));
+ if (ref.Name.empty())
+ continue;
+
+ // Find the function this is referencing
----------------
JDevlieghere wrote:
```suggestion
// Find the function this is referencing.
```
https://github.com/llvm/llvm-project/pull/152295
More information about the lldb-commits
mailing list