summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile/NativePDB
diff options
context:
space:
mode:
authorAleksandr Urakov <aleksandr.urakov@jetbrains.com>2019-05-13 09:41:57 +0000
committerAleksandr Urakov <aleksandr.urakov@jetbrains.com>2019-05-13 09:41:57 +0000
commit869f934d19f76189821caccfc0d93a3bcdf4f182 (patch)
tree63a3b060e1db6fb592781afd589e769213c4b814 /lldb/source/Plugins/SymbolFile/NativePDB
parent0fab8b65decce0ffef93c95fe973809ddc59d313 (diff)
downloadbcm5719-llvm-869f934d19f76189821caccfc0d93a3bcdf4f182.tar.gz
bcm5719-llvm-869f934d19f76189821caccfc0d93a3bcdf4f182.zip
[NativePDB] Support member function types in PdbAstBuilder
Summary: This patch implements missing case in PdbAstBuilder::CreateType for LF_MFUNCTION. This is necessary, for example, in stack unwinding of struct methods. Reviewers: amccarth, aleksandr.urakov Reviewed By: amccarth Subscribers: abidh, teemperor, lldb-commits, leonid.mashinskiy Differential Revision: https://reviews.llvm.org/D61128 llvm-svn: 360569
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/NativePDB')
-rw-r--r--lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp16
-rw-r--r--lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h3
2 files changed, 19 insertions, 0 deletions
diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
index f47272c1725..e27d4699ae2 100644
--- a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
+++ b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
@@ -595,6 +595,17 @@ TypeSP SymbolFileNativePDB::CreateArrayType(PdbTypeSymId type_id,
return array_sp;
}
+
+TypeSP SymbolFileNativePDB::CreateFunctionType(PdbTypeSymId type_id,
+ const MemberFunctionRecord &mfr,
+ CompilerType ct) {
+ Declaration decl;
+ return std::make_shared<lldb_private::Type>(
+ toOpaqueUid(type_id), this, ConstString(), 0, nullptr, LLDB_INVALID_UID,
+ lldb_private::Type::eEncodingIsUID, decl, ct,
+ lldb_private::Type::eResolveStateFull);
+}
+
TypeSP SymbolFileNativePDB::CreateProcedureType(PdbTypeSymId type_id,
const ProcedureRecord &pr,
CompilerType ct) {
@@ -655,6 +666,11 @@ TypeSP SymbolFileNativePDB::CreateType(PdbTypeSymId type_id, CompilerType ct) {
llvm::cantFail(TypeDeserializer::deserializeAs<ProcedureRecord>(cvt, pr));
return CreateProcedureType(type_id, pr, ct);
}
+ if (cvt.kind() == LF_MFUNCTION) {
+ MemberFunctionRecord mfr;
+ llvm::cantFail(TypeDeserializer::deserializeAs<MemberFunctionRecord>(cvt, mfr));
+ return CreateFunctionType(type_id, mfr, ct);
+ }
return nullptr;
}
diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
index 60dd7d48b53..20daff219a0 100644
--- a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
+++ b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
@@ -180,6 +180,9 @@ private:
lldb::TypeSP CreateArrayType(PdbTypeSymId type_id,
const llvm::codeview::ArrayRecord &ar,
CompilerType ct);
+ lldb::TypeSP CreateFunctionType(PdbTypeSymId type_id,
+ const llvm::codeview::MemberFunctionRecord &pr,
+ CompilerType ct);
lldb::TypeSP CreateProcedureType(PdbTypeSymId type_id,
const llvm::codeview::ProcedureRecord &pr,
CompilerType ct);
OpenPOWER on IntegriCloud