[Lldb-commits] [lldb] r344913 - Some cleanups to the native pdb plugin [NFC].
Zachary Turner via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 22 09:19:08 PDT 2018
Author: zturner
Date: Mon Oct 22 09:19:07 2018
New Revision: 344913
URL: http://llvm.org/viewvc/llvm-project?rev=344913&view=rev
Log:
Some cleanups to the native pdb plugin [NFC].
This is mostly some cleanup done in the process of implementing
some basic support for types. I tried to split up the patch a
bit to get some of the NFC portion of the patch out into a separate
commit, and this is the result of that. It moves some code around,
deletes some spurious namespace qualifications, removes some
unnecessary header includes, forward declarations, etc.
Modified:
lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbSymUid.h
lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbUtil.cpp
lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbUtil.h
lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
Modified: lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbSymUid.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbSymUid.h?rev=344913&r1=344912&r2=344913&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbSymUid.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbSymUid.h Mon Oct 22 09:19:07 2018
@@ -18,6 +18,7 @@
#ifndef LLDB_PLUGINS_SYMBOLFILENATIVEPDB_PDBSYMUID_H
#define LLDB_PLUGINS_SYMBOLFILENATIVEPDB_PDBSYMUID_H
+#include "llvm/DebugInfo/CodeView/SymbolRecord.h"
#include "llvm/DebugInfo/PDB/PDBTypes.h"
#include "llvm/Support/Compiler.h"
Modified: lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbUtil.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbUtil.cpp?rev=344913&r1=344912&r2=344913&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbUtil.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbUtil.cpp Mon Oct 22 09:19:07 2018
@@ -10,16 +10,18 @@
#include "PdbUtil.h"
#include "llvm/DebugInfo/CodeView/SymbolDeserializer.h"
+#include "llvm/DebugInfo/CodeView/TypeDeserializer.h"
#include "lldb/Utility/LLDBAssert.h"
+#include "lldb/lldb-enumerations.h"
+
using namespace lldb_private;
using namespace lldb_private::npdb;
using namespace llvm::codeview;
using namespace llvm::pdb;
-llvm::pdb::PDB_SymType
-lldb_private::npdb::CVSymToPDBSym(llvm::codeview::SymbolKind kind) {
+PDB_SymType lldb_private::npdb::CVSymToPDBSym(SymbolKind kind) {
switch (kind) {
case S_COMPILE3:
case S_OBJNAME:
@@ -71,7 +73,32 @@ lldb_private::npdb::CVSymToPDBSym(llvm::
return PDB_SymType::None;
}
-bool lldb_private::npdb::SymbolHasAddress(const llvm::codeview::CVSymbol &sym) {
+PDB_SymType lldb_private::npdb::CVTypeToPDBType(TypeLeafKind kind) {
+ switch (kind) {
+ case LF_ARRAY:
+ return PDB_SymType::ArrayType;
+ case LF_ARGLIST:
+ return PDB_SymType::FunctionSig;
+ case LF_BCLASS:
+ return PDB_SymType::BaseClass;
+ case LF_BINTERFACE:
+ return PDB_SymType::BaseInterface;
+ case LF_CLASS:
+ case LF_STRUCTURE:
+ case LF_INTERFACE:
+ case LF_UNION:
+ return PDB_SymType::UDT;
+ case LF_POINTER:
+ return PDB_SymType::PointerType;
+ case LF_ENUM:
+ return PDB_SymType::Enum;
+ default:
+ lldbassert(false && "Invalid type record kind!");
+ }
+ return PDB_SymType::None;
+}
+
+bool lldb_private::npdb::SymbolHasAddress(const CVSymbol &sym) {
switch (sym.kind()) {
case S_GPROC32:
case S_LPROC32:
@@ -98,7 +125,7 @@ bool lldb_private::npdb::SymbolHasAddres
}
}
-bool lldb_private::npdb::SymbolIsCode(const llvm::codeview::CVSymbol &sym) {
+bool lldb_private::npdb::SymbolIsCode(const CVSymbol &sym) {
switch (sym.kind()) {
case S_GPROC32:
case S_LPROC32:
@@ -156,8 +183,7 @@ SegmentOffset GetSegmentAndOffset<Thread
return {record.Segment, record.DataOffset};
}
-SegmentOffset
-lldb_private::npdb::GetSegmentAndOffset(const llvm::codeview::CVSymbol &sym) {
+SegmentOffset lldb_private::npdb::GetSegmentAndOffset(const CVSymbol &sym) {
switch (sym.kind()) {
case S_GPROC32:
case S_LPROC32:
@@ -229,8 +255,8 @@ GetSegmentOffsetAndLength<CoffGroupSym>(
return SegmentOffsetLength{record.Segment, record.Offset, record.Size};
}
-SegmentOffsetLength lldb_private::npdb::GetSegmentOffsetAndLength(
- const llvm::codeview::CVSymbol &sym) {
+SegmentOffsetLength
+lldb_private::npdb::GetSegmentOffsetAndLength(const CVSymbol &sym) {
switch (sym.kind()) {
case S_GPROC32:
case S_LPROC32:
@@ -256,3 +282,76 @@ SegmentOffsetLength lldb_private::npdb::
}
return {0, 0, 0};
}
+
+bool lldb_private::npdb::IsForwardRefUdt(CVType cvt) {
+ ClassRecord cr;
+ UnionRecord ur;
+ EnumRecord er;
+ switch (cvt.kind()) {
+ case LF_CLASS:
+ case LF_STRUCTURE:
+ case LF_INTERFACE:
+ llvm::cantFail(TypeDeserializer::deserializeAs<ClassRecord>(cvt, cr));
+ return cr.isForwardRef();
+ case LF_UNION:
+ llvm::cantFail(TypeDeserializer::deserializeAs<UnionRecord>(cvt, ur));
+ return ur.isForwardRef();
+ case LF_ENUM:
+ llvm::cantFail(TypeDeserializer::deserializeAs<EnumRecord>(cvt, er));
+ return er.isForwardRef();
+ default:
+ return false;
+ }
+}
+
+lldb::AccessType
+lldb_private::npdb::TranslateMemberAccess(MemberAccess access) {
+ switch (access) {
+ case MemberAccess::Private:
+ return lldb::eAccessPrivate;
+ case MemberAccess::Protected:
+ return lldb::eAccessProtected;
+ case MemberAccess::Public:
+ return lldb::eAccessPublic;
+ case MemberAccess::None:
+ return lldb::eAccessNone;
+ }
+ llvm_unreachable("unreachable");
+}
+
+TypeIndex lldb_private::npdb::GetFieldListIndex(CVType cvt) {
+ switch (cvt.kind()) {
+ case LF_CLASS:
+ case LF_STRUCTURE:
+ case LF_INTERFACE: {
+ ClassRecord cr;
+ cantFail(TypeDeserializer::deserializeAs<ClassRecord>(cvt, cr));
+ return cr.FieldList;
+ }
+ case LF_UNION: {
+ UnionRecord ur;
+ cantFail(TypeDeserializer::deserializeAs<UnionRecord>(cvt, ur));
+ return ur.FieldList;
+ }
+ case LF_ENUM: {
+ EnumRecord er;
+ cantFail(TypeDeserializer::deserializeAs<EnumRecord>(cvt, er));
+ return er.FieldList;
+ }
+ default:
+ llvm_unreachable("Unreachable!");
+ }
+}
+
+llvm::StringRef lldb_private::npdb::DropNameScope(llvm::StringRef name) {
+ // Not all PDB names can be parsed with CPlusPlusNameParser.
+ // E.g. it fails on names containing `anonymous namespace'.
+ // So we simply drop everything before '::'
+
+ auto offset = name.rfind("::");
+ if (offset == llvm::StringRef::npos)
+ return name;
+ assert(offset + 2 <= name.size());
+
+ return name.substr(offset + 2);
+}
\ No newline at end of file
Modified: lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbUtil.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbUtil.h?rev=344913&r1=344912&r2=344913&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbUtil.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbUtil.h Mon Oct 22 09:19:07 2018
@@ -10,6 +10,8 @@
#ifndef LLDB_PLUGINS_SYMBOLFILENATIVEPDB_PDBUTIL_H
#define LLDB_PLUGINS_SYMBOLFILENATIVEPDB_PDBUTIL_H
+#include "lldb/lldb-enumerations.h"
+
#include "llvm/DebugInfo/CodeView/SymbolRecord.h"
#include "llvm/DebugInfo/PDB/PDBTypes.h"
@@ -35,6 +37,7 @@ struct SegmentOffsetLength {
};
llvm::pdb::PDB_SymType CVSymToPDBSym(llvm::codeview::SymbolKind kind);
+llvm::pdb::PDB_SymType CVTypeToPDBType(llvm::codeview::TypeLeafKind kind);
bool SymbolHasAddress(const llvm::codeview::CVSymbol &sym);
bool SymbolIsCode(const llvm::codeview::CVSymbol &sym);
@@ -52,6 +55,13 @@ inline bool IsValidRecord(const llvm::co
return sym.Module > 0;
}
+bool IsForwardRefUdt(llvm::codeview::CVType cvt);
+
+lldb::AccessType TranslateMemberAccess(llvm::codeview::MemberAccess access);
+llvm::codeview::TypeIndex GetFieldListIndex(llvm::codeview::CVType cvt);
+
+llvm::StringRef DropNameScope(llvm::StringRef name);
+
} // namespace npdb
} // namespace lldb_private
Modified: lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp?rev=344913&r1=344912&r2=344913&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp Mon Oct 22 09:19:07 2018
@@ -9,8 +9,6 @@
#include "SymbolFileNativePDB.h"
-#include "clang/Lex/Lexer.h"
-
#include "lldb/Core/Module.h"
#include "lldb/Core/PluginManager.h"
#include "lldb/Symbol/CompileUnit.h"
@@ -151,10 +149,9 @@ void SymbolFileNativePDB::Terminate() {
PluginManager::UnregisterPlugin(CreateInstance);
}
-void SymbolFileNativePDB::DebuggerInitialize(lldb_private::Debugger &debugger) {
-}
+void SymbolFileNativePDB::DebuggerInitialize(Debugger &debugger) {}
-lldb_private::ConstString SymbolFileNativePDB::GetPluginNameStatic() {
+ConstString SymbolFileNativePDB::GetPluginNameStatic() {
static ConstString g_name("native-pdb");
return g_name;
}
@@ -163,12 +160,11 @@ const char *SymbolFileNativePDB::GetPlug
return "Microsoft PDB debug symbol cross-platform file reader.";
}
-lldb_private::SymbolFile *
-SymbolFileNativePDB::CreateInstance(lldb_private::ObjectFile *obj_file) {
+SymbolFile *SymbolFileNativePDB::CreateInstance(ObjectFile *obj_file) {
return new SymbolFileNativePDB(obj_file);
}
-SymbolFileNativePDB::SymbolFileNativePDB(lldb_private::ObjectFile *object_file)
+SymbolFileNativePDB::SymbolFileNativePDB(ObjectFile *object_file)
: SymbolFile(object_file) {}
SymbolFileNativePDB::~SymbolFileNativePDB() {}
@@ -260,7 +256,7 @@ lldb::FunctionSP SymbolFileNativePDB::Cr
if (!func_range.GetBaseAddress().IsValid())
return nullptr;
- lldb_private::Type *func_type = nullptr;
+ Type *func_type = nullptr;
// FIXME: Resolve types and mangled names.
PdbSymUid sig_uid =
@@ -287,7 +283,7 @@ SymbolFileNativePDB::CreateCompileUnit(c
llvm::StringRef source_file_name =
m_index->compilands().GetMainSourceFile(cci);
- lldb_private::FileSpec fs(source_file_name, false);
+ FileSpec fs(source_file_name, false);
CompUnitSP cu_sp =
std::make_shared<CompileUnit>(m_obj_file->GetModule(), nullptr, fs,
@@ -333,8 +329,8 @@ lldb::CompUnitSP SymbolFileNativePDB::Pa
return GetOrCreateCompileUnit(item);
}
-lldb::LanguageType SymbolFileNativePDB::ParseCompileUnitLanguage(
- const lldb_private::SymbolContext &sc) {
+lldb::LanguageType
+SymbolFileNativePDB::ParseCompileUnitLanguage(const SymbolContext &sc) {
// What fields should I expect to be filled out on the SymbolContext? Is it
// safe to assume that `sc.comp_unit` is valid?
if (!sc.comp_unit)
@@ -350,8 +346,7 @@ lldb::LanguageType SymbolFileNativePDB::
return TranslateLanguage(item->m_compile_opts->getLanguage());
}
-size_t SymbolFileNativePDB::ParseCompileUnitFunctions(
- const lldb_private::SymbolContext &sc) {
+size_t SymbolFileNativePDB::ParseCompileUnitFunctions(const SymbolContext &sc) {
lldbassert(sc.comp_unit);
return false;
}
@@ -366,10 +361,9 @@ static bool NeedsResolvedCompileUnit(uin
return (resolve_scope & flags) != 0;
}
-uint32_t
-SymbolFileNativePDB::ResolveSymbolContext(const lldb_private::Address &addr,
- uint32_t resolve_scope,
- lldb_private::SymbolContext &sc) {
+uint32_t SymbolFileNativePDB::ResolveSymbolContext(const Address &addr,
+ uint32_t resolve_scope,
+ SymbolContext &sc) {
uint32_t resolved_flags = 0;
lldb::addr_t file_addr = addr.GetFileAddress();
@@ -444,8 +438,7 @@ static void TerminateLineSequence(LineTa
table.InsertSequence(seq.release());
}
-bool SymbolFileNativePDB::ParseCompileUnitLineTable(
- const lldb_private::SymbolContext &sc) {
+bool SymbolFileNativePDB::ParseCompileUnitLineTable(const SymbolContext &sc) {
// Unfortunately LLDB is set up to parse the entire compile unit line table
// all at once, even if all it really needs is line info for a specific
// function. In the future it would be nice if it could set the sc.m_function
@@ -519,15 +512,13 @@ bool SymbolFileNativePDB::ParseCompileUn
return true;
}
-bool SymbolFileNativePDB::ParseCompileUnitDebugMacros(
- const lldb_private::SymbolContext &sc) {
+bool SymbolFileNativePDB::ParseCompileUnitDebugMacros(const SymbolContext &sc) {
// PDB doesn't contain information about macros
return false;
}
bool SymbolFileNativePDB::ParseCompileUnitSupportFiles(
- const lldb_private::SymbolContext &sc,
- lldb_private::FileSpecList &support_files) {
+ const SymbolContext &sc, FileSpecList &support_files) {
lldbassert(sc.comp_unit);
PdbSymUid comp_uid = PdbSymUid::fromOpaqueId(sc.comp_unit->GetID());
@@ -547,23 +538,20 @@ bool SymbolFileNativePDB::ParseCompileUn
}
bool SymbolFileNativePDB::ParseImportedModules(
- const lldb_private::SymbolContext &sc,
- std::vector<lldb_private::ConstString> &imported_modules) {
+ const SymbolContext &sc, std::vector<ConstString> &imported_modules) {
// PDB does not yet support module debug info
return false;
}
-size_t SymbolFileNativePDB::ParseFunctionBlocks(
- const lldb_private::SymbolContext &sc) {
+size_t SymbolFileNativePDB::ParseFunctionBlocks(const SymbolContext &sc) {
lldbassert(sc.comp_unit && sc.function);
return 0;
}
uint32_t SymbolFileNativePDB::FindFunctions(
- const lldb_private::ConstString &name,
- const lldb_private::CompilerDeclContext *parent_decl_ctx,
+ const ConstString &name, const CompilerDeclContext *parent_decl_ctx,
uint32_t name_type_mask, bool include_inlines, bool append,
- lldb_private::SymbolContextList &sc_list) {
+ SymbolContextList &sc_list) {
// For now we only support lookup by method name.
if (!(name_type_mask & eFunctionNameTypeMethod))
return 0;
@@ -583,7 +571,7 @@ uint32_t SymbolFileNativePDB::FindFuncti
PdbSymUid cuid = PdbSymUid::makeCompilandId(proc);
CompilandIndexItem &cci = m_index->compilands().GetOrCreateCompiland(cuid);
- lldb_private::SymbolContext sc;
+ SymbolContext sc;
sc.comp_unit = GetOrCreateCompileUnit(cci).get();
sc.module_sp = sc.comp_unit->GetModule();
@@ -596,21 +584,50 @@ uint32_t SymbolFileNativePDB::FindFuncti
return sc_list.GetSize();
}
-uint32_t
-SymbolFileNativePDB::FindFunctions(const lldb_private::RegularExpression ®ex,
- bool include_inlines, bool append,
- lldb_private::SymbolContextList &sc_list) {
+uint32_t SymbolFileNativePDB::FindFunctions(const RegularExpression ®ex,
+ bool include_inlines, bool append,
+ SymbolContextList &sc_list) {
+ return 0;
+}
+
+uint32_t SymbolFileNativePDB::FindTypes(
+ const SymbolContext &sc, const ConstString &name,
+ const CompilerDeclContext *parent_decl_ctx, bool append,
+ uint32_t max_matches, llvm::DenseSet<SymbolFile *> &searched_symbol_files,
+ TypeMap &types) {
+ return 0;
+}
+
+size_t
+SymbolFileNativePDB::FindTypes(const std::vector<CompilerContext> &context,
+ bool append, TypeMap &types) {
+ return 0;
+}
+
+size_t SymbolFileNativePDB::ParseTypes(const SymbolContext &sc) { return 0; }
+
+Type *SymbolFileNativePDB::ResolveTypeUID(lldb::user_id_t type_uid) {
+ return nullptr;
+}
+
+bool SymbolFileNativePDB::CompleteType(CompilerType &compiler_type) {
+ return false;
+}
+
+size_t SymbolFileNativePDB::GetTypes(lldb_private::SymbolContextScope *sc_scope,
+ uint32_t type_mask,
+ lldb_private::TypeList &type_list) {
return 0;
}
-lldb_private::CompilerDeclContext SymbolFileNativePDB::FindNamespace(
- const lldb_private::SymbolContext &sc,
- const lldb_private::ConstString &name,
- const lldb_private::CompilerDeclContext *parent_decl_ctx) {
+CompilerDeclContext
+SymbolFileNativePDB::FindNamespace(const SymbolContext &sc,
+ const ConstString &name,
+ const CompilerDeclContext *parent_decl_ctx) {
return {};
}
-lldb_private::TypeSystem *
+TypeSystem *
SymbolFileNativePDB::GetTypeSystemForLanguage(lldb::LanguageType language) {
auto type_system =
m_obj_file->GetModule()->GetTypeSystemForLanguage(language);
@@ -619,7 +636,7 @@ SymbolFileNativePDB::GetTypeSystemForLan
return type_system;
}
-lldb_private::ConstString SymbolFileNativePDB::GetPluginName() {
+ConstString SymbolFileNativePDB::GetPluginName() {
static ConstString g_name("pdb");
return g_name;
}
Modified: lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h?rev=344913&r1=344912&r2=344913&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h Mon Oct 22 09:19:07 2018
@@ -7,50 +7,49 @@
//
//===----------------------------------------------------------------------===//
-#ifndef lldb_Plugins_SymbolFile_PDB_SymbolFileNativePDB_h_
-#define lldb_Plugins_SymbolFile_PDB_SymbolFileNativePDB_h_
+#ifndef LLDB_PLUGINS_SYMBOLFILE_NATIVEPDB_SYMBOLFILENATIVEPDB_H
+#define LLDB_PLUGINS_SYMBOLFILE_NATIVEPDB_SYMBOLFILENATIVEPDB_H
-#include "lldb/Core/UniqueCStringMap.h"
#include "lldb/Symbol/SymbolFile.h"
-#include "lldb/Symbol/VariableList.h"
-#include "lldb/Utility/UserID.h"
#include "llvm/ADT/DenseMap.h"
-#include "llvm/ADT/Optional.h"
#include "llvm/DebugInfo/CodeView/CVRecord.h"
-#include "llvm/DebugInfo/CodeView/StringsAndChecksums.h"
#include "llvm/DebugInfo/CodeView/SymbolRecord.h"
-#include "llvm/DebugInfo/PDB/Native/ModuleDebugStream.h"
#include "llvm/DebugInfo/PDB/PDBTypes.h"
#include "CompileUnitIndex.h"
#include "PdbIndex.h"
-#include <unordered_map>
+namespace clang {
+class TagDecl;
+}
namespace llvm {
-namespace pdb {
-class PDBFile;
-class PDBSymbol;
-class PDBSymbolCompiland;
-class PDBSymbolData;
-class PDBSymbolFunc;
-
-class DbiStream;
-class TpiStream;
-class TpiStream;
-class InfoStream;
-class PublicsStream;
-class GlobalsStream;
-class SymbolStream;
-class ModuleDebugStreamRef;
-} // namespace pdb
+namespace codeview {
+class ClassRecord;
+class EnumRecord;
+class ModifierRecord;
+class PointerRecord;
+struct UnionRecord;
+} // namespace codeview
} // namespace llvm
namespace lldb_private {
+class ClangASTImporter;
+
namespace npdb {
-class SymbolFileNativePDB : public lldb_private::SymbolFile {
+struct DeclStatus {
+ DeclStatus() = default;
+ DeclStatus(lldb::user_id_t uid, Type::ResolveStateTag status)
+ : uid(uid), status(status) {}
+ lldb::user_id_t uid = 0;
+ Type::ResolveStateTag status = Type::eResolveStateForward;
+};
+
+class SymbolFileNativePDB : public SymbolFile {
+ friend class UdtRecordCompleter;
+
public:
//------------------------------------------------------------------
// Static Functions
@@ -59,19 +58,18 @@ public:
static void Terminate();
- static void DebuggerInitialize(lldb_private::Debugger &debugger);
+ static void DebuggerInitialize(Debugger &debugger);
- static lldb_private::ConstString GetPluginNameStatic();
+ static ConstString GetPluginNameStatic();
static const char *GetPluginDescriptionStatic();
- static lldb_private::SymbolFile *
- CreateInstance(lldb_private::ObjectFile *obj_file);
+ static SymbolFile *CreateInstance(ObjectFile *obj_file);
//------------------------------------------------------------------
// Constructors and Destructors
//------------------------------------------------------------------
- SymbolFileNativePDB(lldb_private::ObjectFile *ofile);
+ SymbolFileNativePDB(ObjectFile *ofile);
~SymbolFileNativePDB() override;
@@ -87,70 +85,59 @@ public:
lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) override;
- lldb::LanguageType
- ParseCompileUnitLanguage(const lldb_private::SymbolContext &sc) override;
+ lldb::LanguageType ParseCompileUnitLanguage(const SymbolContext &sc) override;
- size_t
- ParseCompileUnitFunctions(const lldb_private::SymbolContext &sc) override;
+ size_t ParseCompileUnitFunctions(const SymbolContext &sc) override;
- bool
- ParseCompileUnitLineTable(const lldb_private::SymbolContext &sc) override;
+ bool ParseCompileUnitLineTable(const SymbolContext &sc) override;
- bool
- ParseCompileUnitDebugMacros(const lldb_private::SymbolContext &sc) override;
+ bool ParseCompileUnitDebugMacros(const SymbolContext &sc) override;
- bool ParseCompileUnitSupportFiles(
- const lldb_private::SymbolContext &sc,
- lldb_private::FileSpecList &support_files) override;
+ bool ParseCompileUnitSupportFiles(const SymbolContext &sc,
+ FileSpecList &support_files) override;
- bool ParseImportedModules(
- const lldb_private::SymbolContext &sc,
- std::vector<lldb_private::ConstString> &imported_modules) override;
+ bool
+ ParseImportedModules(const SymbolContext &sc,
+ std::vector<ConstString> &imported_modules) override;
- size_t ParseFunctionBlocks(const lldb_private::SymbolContext &sc) override;
+ size_t ParseFunctionBlocks(const SymbolContext &sc) override;
- size_t ParseTypes(const lldb_private::SymbolContext &sc) override {
+ size_t ParseTypes(const SymbolContext &sc) override;
+ size_t ParseVariablesForContext(const SymbolContext &sc) override {
return 0;
}
- size_t
- ParseVariablesForContext(const lldb_private::SymbolContext &sc) override {
- return 0;
- }
- lldb_private::Type *ResolveTypeUID(lldb::user_id_t type_uid) override {
- return nullptr;
- }
- bool CompleteType(lldb_private::CompilerType &compiler_type) override {
- return false;
- }
- uint32_t ResolveSymbolContext(const lldb_private::Address &so_addr,
- uint32_t resolve_scope,
- lldb_private::SymbolContext &sc) override;
-
- virtual size_t GetTypes(lldb_private::SymbolContextScope *sc_scope,
- uint32_t type_mask,
- lldb_private::TypeList &type_list) override {
- return 0;
- }
-
- uint32_t
- FindFunctions(const lldb_private::ConstString &name,
- const lldb_private::CompilerDeclContext *parent_decl_ctx,
- uint32_t name_type_mask, bool include_inlines, bool append,
- lldb_private::SymbolContextList &sc_list) override;
-
- uint32_t FindFunctions(const lldb_private::RegularExpression ®ex,
- bool include_inlines, bool append,
- lldb_private::SymbolContextList &sc_list) override;
-
- lldb_private::TypeSystem *
- GetTypeSystemForLanguage(lldb::LanguageType language) override;
-
- lldb_private::CompilerDeclContext FindNamespace(
- const lldb_private::SymbolContext &sc,
- const lldb_private::ConstString &name,
- const lldb_private::CompilerDeclContext *parent_decl_ctx) override;
+ Type *ResolveTypeUID(lldb::user_id_t type_uid) override;
+ bool CompleteType(CompilerType &compiler_type) override;
+ uint32_t ResolveSymbolContext(const Address &so_addr, uint32_t resolve_scope,
+ SymbolContext &sc) override;
+
+ size_t GetTypes(SymbolContextScope *sc_scope, uint32_t type_mask,
+ TypeList &type_list) override;
+
+ uint32_t FindFunctions(const ConstString &name,
+ const CompilerDeclContext *parent_decl_ctx,
+ uint32_t name_type_mask, bool include_inlines,
+ bool append, SymbolContextList &sc_list) override;
+
+ uint32_t FindFunctions(const RegularExpression ®ex, bool include_inlines,
+ bool append, SymbolContextList &sc_list) override;
+
+ uint32_t FindTypes(const SymbolContext &sc, const ConstString &name,
+ const CompilerDeclContext *parent_decl_ctx, bool append,
+ uint32_t max_matches,
+ llvm::DenseSet<SymbolFile *> &searched_symbol_files,
+ TypeMap &types) override;
+
+ size_t FindTypes(const std::vector<CompilerContext> &context, bool append,
+ TypeMap &types) override;
+
+ TypeSystem *GetTypeSystemForLanguage(lldb::LanguageType language) override;
+
+ CompilerDeclContext
+ FindNamespace(const SymbolContext &sc, const ConstString &name,
+ const CompilerDeclContext *parent_decl_ctx) override;
- lldb_private::ConstString GetPluginName() override;
+ ConstString GetPluginName() override;
uint32_t GetPluginVersion() override;
More information about the lldb-commits
mailing list