aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h')
-rw-r--r--lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
index 2405f8b..a5fef35 100644
--- a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
+++ b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
@@ -140,6 +140,12 @@ public:
std::optional<PdbCompilandSymId> FindSymbolScope(PdbCompilandSymId id);
+ /// Find the mangled name for a function
+ ///
+ /// \param id A symbol ID of a S_LPROC32/S_GPROC32 record
+ /// \returns The mangled name of the function (if available)
+ std::optional<llvm::StringRef> FindMangledFunctionName(PdbCompilandSymId id);
+
void FindTypes(const lldb_private::TypeQuery &match,
lldb_private::TypeResults &results) override;
@@ -269,6 +275,20 @@ private:
void CacheUdtDeclarations();
llvm::Expected<Declaration> ResolveUdtDeclaration(PdbTypeSymId type_id);
+ /// Find a symbol name at a specific address (`so`).
+ ///
+ /// \param[in] so The segment and offset where the symbol is located.
+ /// \param[in] function_type If the symbol is expected to be a function, this
+ /// has to be the type of the function. It's used to strip the name of
+ /// __cdecl functions on x86.
+ /// \returns The mangled symbol name if found, otherwise `std::nullopt`.
+ std::optional<llvm::StringRef> FindMangledSymbol(
+ SegmentOffset so,
+ llvm::codeview::TypeIndex function_type = llvm::codeview::TypeIndex());
+
+ llvm::StringRef StripMangledFunctionName(llvm::StringRef mangled,
+ PdbTypeSymId func_ty);
+
llvm::BumpPtrAllocator m_allocator;
lldb::addr_t m_obj_load_address = 0;