[Lldb-commits] [lldb] [LLDB][NativePDB] Create functions with mangled name (PR #149701)
Michael Buch via lldb-commits
lldb-commits at lists.llvm.org
Mon Jul 21 02:30:17 PDT 2025
================
@@ -2353,3 +2356,67 @@ SymbolFileNativePDB::GetParentType(llvm::codeview::TypeIndex ti) {
return std::nullopt;
return parent_iter->second;
}
+
+std::optional<llvm::StringRef>
+SymbolFileNativePDB::FindMangledFunctionName(PdbCompilandSymId func_id) {
+ const CompilandIndexItem *cci =
+ m_index->compilands().GetCompiland(func_id.modi);
+ if (!cci)
+ return std::nullopt;
+
+ CVSymbol sym_record = cci->m_debug_stream.readSymbolAtOffset(func_id.offset);
+ if (sym_record.kind() != S_LPROC32 && sym_record.kind() != S_GPROC32)
+ return std::nullopt;
+
+ ProcSym proc(static_cast<SymbolRecordKind>(sym_record.kind()));
+ cantFail(SymbolDeserializer::deserializeAs<ProcSym>(sym_record, proc));
+ return FindMangledSymbol(SegmentOffset(proc.Segment, proc.CodeOffset));
+}
+
+/// Find the mangled name of a function at \a so.
----------------
Michael137 wrote:
@rnk any thoughts on this? Could this live somewhere in LLVM's PDB support?
https://github.com/llvm/llvm-project/pull/149701
More information about the lldb-commits
mailing list