LLDB  mainline
SymbolFileNativePDB.h
Go to the documentation of this file.
1 //===-- SymbolFileNativePDB.h -----------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLDB_SOURCE_PLUGINS_SYMBOLFILE_NATIVEPDB_SYMBOLFILENATIVEPDB_H
10 #define LLDB_SOURCE_PLUGINS_SYMBOLFILE_NATIVEPDB_SYMBOLFILENATIVEPDB_H
11 
12 #include "lldb/Symbol/LineTable.h"
13 #include "lldb/Symbol/SymbolFile.h"
14 
15 #include "llvm/ADT/DenseMap.h"
16 #include "llvm/DebugInfo/CodeView/CVRecord.h"
17 #include "llvm/DebugInfo/CodeView/SymbolRecord.h"
18 #include "llvm/DebugInfo/PDB/PDBTypes.h"
19 
20 #include "CompileUnitIndex.h"
21 #include "PdbIndex.h"
22 #include "PdbAstBuilder.h"
23 
24 namespace clang {
25 class TagDecl;
26 }
27 
28 namespace llvm {
29 namespace codeview {
30 class ClassRecord;
31 class EnumRecord;
32 class ModifierRecord;
33 class PointerRecord;
34 struct UnionRecord;
35 } // namespace codeview
36 } // namespace llvm
37 
38 namespace lldb_private {
39 
40 namespace npdb {
41 
43  friend class UdtRecordCompleter;
44 
45  /// LLVM RTTI support.
46  static char ID;
47 
48 public:
49  /// LLVM RTTI support.
50  /// \{
51  bool isA(const void *ClassID) const override {
52  return ClassID == &ID || SymbolFileCommon::isA(ClassID);
53  }
54  static bool classof(const SymbolFile *obj) { return obj->isA(&ID); }
55  /// \}
56 
57  // Static Functions
58  static void Initialize();
59 
60  static void Terminate();
61 
62  static void DebuggerInitialize(Debugger &debugger);
63 
64  static llvm::StringRef GetPluginNameStatic() { return "native-pdb"; }
65 
66  static llvm::StringRef GetPluginDescriptionStatic();
67 
68  static SymbolFile *CreateInstance(lldb::ObjectFileSP objfile_sp);
69 
70  // Constructors and Destructors
71  SymbolFileNativePDB(lldb::ObjectFileSP objfile_sp);
72 
73  ~SymbolFileNativePDB() override;
74 
75  uint32_t CalculateAbilities() override;
76 
77  void InitializeObject() override;
78 
79  uint64_t GetDebugInfoSize() override;
80 
81  // Compile Unit function calls
82 
83  void
85 
87  ParseLanguage(lldb_private::CompileUnit &comp_unit) override;
88 
89  size_t ParseFunctions(lldb_private::CompileUnit &comp_unit) override;
90 
91  bool ParseLineTable(lldb_private::CompileUnit &comp_unit) override;
92 
93  bool ParseDebugMacros(lldb_private::CompileUnit &comp_unit) override;
94 
96  FileSpecList &support_files) override;
97  size_t ParseTypes(lldb_private::CompileUnit &comp_unit) override;
98 
100  const SymbolContext &sc,
101  std::vector<lldb_private::SourceModule> &imported_modules) override;
102 
103  size_t ParseBlocksRecursive(Function &func) override;
104 
106  const CompilerDeclContext &parent_decl_ctx,
107  uint32_t max_matches,
108  VariableList &variables) override;
109 
110  size_t ParseVariablesForContext(const SymbolContext &sc) override;
111 
112  void AddSymbols(Symtab &symtab) override;
113 
117  Type *ResolveTypeUID(lldb::user_id_t type_uid) override;
118  llvm::Optional<ArrayInfo> GetDynamicArrayInfoForUID(
119  lldb::user_id_t type_uid,
120  const lldb_private::ExecutionContext *exe_ctx) override;
121 
122  bool CompleteType(CompilerType &compiler_type) override;
123  uint32_t ResolveSymbolContext(const Address &so_addr,
124  lldb::SymbolContextItem resolve_scope,
125  SymbolContext &sc) override;
126  uint32_t ResolveSymbolContext(const SourceLocationSpec &src_location_spec,
127  lldb::SymbolContextItem resolve_scope,
128  SymbolContextList &sc_list) override;
129 
130  void GetTypes(SymbolContextScope *sc_scope, lldb::TypeClass type_mask,
131  TypeList &type_list) override;
132 
133  void FindFunctions(const Module::LookupInfo &lookup_info,
134  const CompilerDeclContext &parent_decl_ctx,
135  bool include_inlines, SymbolContextList &sc_list) override;
136 
137  void FindFunctions(const RegularExpression &regex, bool include_inlines,
138  SymbolContextList &sc_list) override;
139 
140  llvm::Optional<PdbCompilandSymId> FindSymbolScope(PdbCompilandSymId id);
141 
142  void FindTypes(ConstString name, const CompilerDeclContext &parent_decl_ctx,
143  uint32_t max_matches,
144  llvm::DenseSet<SymbolFile *> &searched_symbol_files,
145  TypeMap &types) override;
146 
147  void FindTypes(llvm::ArrayRef<CompilerContext> pattern, LanguageSet languages,
148  llvm::DenseSet<SymbolFile *> &searched_symbol_files,
149  TypeMap &types) override;
150 
151  llvm::Expected<lldb::TypeSystemSP>
152  GetTypeSystemForLanguage(lldb::LanguageType language) override;
153 
156  const CompilerDeclContext &parent_decl_ctx) override;
157 
158  llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
159 
160  llvm::pdb::PDBFile &GetPDBFile() { return m_index->pdb(); }
161  const llvm::pdb::PDBFile &GetPDBFile() const { return m_index->pdb(); }
162 
163  PdbIndex &GetIndex() { return *m_index; };
164 
165  void DumpClangAST(Stream &s) override;
166 
167  llvm::Optional<llvm::codeview::TypeIndex>
168  GetParentType(llvm::codeview::TypeIndex ti);
169 
170 private:
173  const lldb_private::LineTable::Entry &rhs) const {
174  return lhs.file_addr < rhs.file_addr;
175  }
176  };
177 
178  // From address range relative to function base to source line number.
179  using RangeSourceLineVector =
181  // InlineSite contains information in a S_INLINESITE record.
182  struct InlineSite {
184  std::shared_ptr<InlineFunctionInfo> inline_function_info;
186  std::vector<lldb_private::LineTable::Entry> line_entries;
188  };
189 
190  void BuildParentMap();
191 
193 
194  lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) override;
195 
196  void FindTypesByName(llvm::StringRef name, uint32_t max_matches,
197  TypeMap &types);
198 
199  lldb::TypeSP CreateModifierType(PdbTypeSymId type_id,
200  const llvm::codeview::ModifierRecord &mr,
201  CompilerType ct);
202  lldb::TypeSP CreatePointerType(PdbTypeSymId type_id,
203  const llvm::codeview::PointerRecord &pr,
204  CompilerType ct);
205  lldb::TypeSP CreateSimpleType(llvm::codeview::TypeIndex ti, CompilerType ct);
206  lldb::TypeSP CreateTagType(PdbTypeSymId type_id,
207  const llvm::codeview::ClassRecord &cr,
208  CompilerType ct);
209  lldb::TypeSP CreateTagType(PdbTypeSymId type_id,
210  const llvm::codeview::EnumRecord &er,
211  CompilerType ct);
212  lldb::TypeSP CreateTagType(PdbTypeSymId type_id,
213  const llvm::codeview::UnionRecord &ur,
214  CompilerType ct);
215  lldb::TypeSP CreateArrayType(PdbTypeSymId type_id,
216  const llvm::codeview::ArrayRecord &ar,
217  CompilerType ct);
218  lldb::TypeSP CreateFunctionType(PdbTypeSymId type_id,
219  const llvm::codeview::MemberFunctionRecord &pr,
220  CompilerType ct);
221  lldb::TypeSP CreateProcedureType(PdbTypeSymId type_id,
222  const llvm::codeview::ProcedureRecord &pr,
223  CompilerType ct);
224  lldb::TypeSP CreateClassStructUnion(PdbTypeSymId type_id,
225  const llvm::codeview::TagRecord &record,
226  size_t size, CompilerType ct);
227 
228  lldb::FunctionSP GetOrCreateFunction(PdbCompilandSymId func_id,
229  CompileUnit &comp_unit);
230  lldb::CompUnitSP GetOrCreateCompileUnit(const CompilandIndexItem &cci);
231  lldb::TypeSP GetOrCreateType(PdbTypeSymId type_id);
232  lldb::TypeSP GetOrCreateType(llvm::codeview::TypeIndex ti);
233  lldb::VariableSP GetOrCreateGlobalVariable(PdbGlobalSymId var_id);
235  lldb::VariableSP GetOrCreateLocalVariable(PdbCompilandSymId scope_id,
236  PdbCompilandSymId var_id,
237  bool is_param);
238  lldb::TypeSP GetOrCreateTypedef(PdbGlobalSymId id);
239 
240  lldb::FunctionSP CreateFunction(PdbCompilandSymId func_id,
241  CompileUnit &comp_unit);
243  lldb::VariableSP CreateLocalVariable(PdbCompilandSymId scope_id,
244  PdbCompilandSymId var_id, bool is_param);
245  lldb::TypeSP CreateTypedef(PdbGlobalSymId id);
246  lldb::CompUnitSP CreateCompileUnit(const CompilandIndexItem &cci);
247  lldb::TypeSP CreateType(PdbTypeSymId type_id, CompilerType ct);
248  lldb::TypeSP CreateAndCacheType(PdbTypeSymId type_id);
249  lldb::VariableSP CreateGlobalVariable(PdbGlobalSymId var_id);
250  lldb::VariableSP CreateConstantSymbol(PdbGlobalSymId var_id,
251  const llvm::codeview::CVSymbol &cvs);
252  size_t ParseVariablesForCompileUnit(CompileUnit &comp_unit,
253  VariableList &variables);
254  size_t ParseVariablesForBlock(PdbCompilandSymId block_id);
255 
256  llvm::Expected<uint32_t> GetFileIndex(const CompilandIndexItem &cii,
257  uint32_t file_id);
258 
260  PdbCompilandSymId parent,
261  llvm::function_ref<bool(llvm::codeview::SymbolKind, PdbCompilandSymId)>
262  fn);
263 
264  void ParseInlineSite(PdbCompilandSymId inline_site_id, Address func_addr);
265 
266  llvm::BumpPtrAllocator m_allocator;
267 
269  bool m_done_full_type_scan = false;
270  // UID for anonymous union and anonymous struct as they don't have entities in
271  // pdb debug info.
273 
274  std::unique_ptr<llvm::pdb::PDBFile> m_file_up;
275  std::unique_ptr<PdbIndex> m_index;
276 
277  llvm::DenseMap<lldb::user_id_t, lldb::VariableSP> m_global_vars;
278  llvm::DenseMap<lldb::user_id_t, lldb::VariableSP> m_local_variables;
279  llvm::DenseMap<lldb::user_id_t, lldb::BlockSP> m_blocks;
280  llvm::DenseMap<lldb::user_id_t, lldb::FunctionSP> m_functions;
281  llvm::DenseMap<lldb::user_id_t, lldb::CompUnitSP> m_compilands;
282  llvm::DenseMap<lldb::user_id_t, lldb::TypeSP> m_types;
283  llvm::DenseMap<lldb::user_id_t, std::shared_ptr<InlineSite>> m_inline_sites;
284  llvm::DenseMap<llvm::codeview::TypeIndex, llvm::codeview::TypeIndex>
286 };
287 
288 } // namespace npdb
289 } // namespace lldb_private
290 
291 #endif // LLDB_SOURCE_PLUGINS_SYMBOLFILE_NATIVEPDB_SYMBOLFILENATIVEPDB_H
lldb_private::SymbolFile
Provides public interface for all SymbolFiles.
Definition: SymbolFile.h:46
lldb_private::ExecutionContext
Definition: ExecutionContext.h:292
lldb_private::npdb::SymbolFileNativePDB::GetOrCreateLocalVariable
lldb::VariableSP GetOrCreateLocalVariable(PdbCompilandSymId scope_id, PdbCompilandSymId var_id, bool is_param)
Definition: SymbolFileNativePDB.cpp:1866
llvm
Definition: Debugger.h:50
lldb_private::npdb::SymbolFileNativePDB::GetFileIndex
llvm::Expected< uint32_t > GetFileIndex(const CompilandIndexItem &cii, uint32_t file_id)
Definition: SymbolFileNativePDB.cpp:1348
lldb_private::npdb::SymbolFileNativePDB::LineTableEntryComparator
Definition: SymbolFileNativePDB.h:171
lldb_private::RegularExpression
Definition: RegularExpression.h:18
lldb_private::npdb::SymbolFileNativePDB::GetOrCreateTypedef
lldb::TypeSP GetOrCreateTypedef(PdbGlobalSymId id)
Definition: SymbolFileNativePDB.cpp:1901
lldb_private::npdb::SymbolFileNativePDB::GetDebugInfoSize
uint64_t GetDebugInfoSize() override
Metrics gathering functions.
Definition: SymbolFileNativePDB.cpp:2152
lldb_private::npdb::SymbolFileNativePDB::CreateGlobalVariable
lldb::VariableSP CreateGlobalVariable(PdbGlobalSymId var_id)
Definition: SymbolFileNativePDB.cpp:845
lldb_private::npdb::SymbolFileNativePDB::Terminate
static void Terminate()
Definition: SymbolFileNativePDB.cpp:286
lldb_private::npdb::SymbolFileNativePDB::CreateFunctionType
lldb::TypeSP CreateFunctionType(PdbTypeSymId type_id, const llvm::codeview::MemberFunctionRecord &pr, CompilerType ct)
Definition: SymbolFileNativePDB.cpp:698
lldb_private::npdb::SymbolFileNativePDB::CreateSimpleType
lldb::TypeSP CreateSimpleType(llvm::codeview::TypeIndex ti, CompilerType ct)
Definition: SymbolFileNativePDB.cpp:579
lldb_private::npdb::SymbolFileNativePDB::ParseLineTable
bool ParseLineTable(lldb_private::CompileUnit &comp_unit) override
Definition: SymbolFileNativePDB.cpp:1182
lldb_private::SourceLocationSpec
Definition: SourceLocationSpec.h:27
lldb_private::LineTable::Entry::file_addr
lldb::addr_t file_addr
The file address for this line entry.
Definition: LineTable.h:280
lldb_private::npdb::SymbolFileNativePDB::GetPluginDescriptionStatic
static llvm::StringRef GetPluginDescriptionStatic()
Definition: SymbolFileNativePDB.cpp:292
lldb_private::npdb::SymbolFileNativePDB
Definition: SymbolFileNativePDB.h:42
lldb_private::npdb::SymbolFileNativePDB::ParseTypes
size_t ParseTypes(lldb_private::CompileUnit &comp_unit) override
Definition: SymbolFileNativePDB.cpp:1756
lldb_private::npdb::SymbolFileNativePDB::FindTypes
void FindTypes(ConstString name, const CompilerDeclContext &parent_decl_ctx, uint32_t max_matches, llvm::DenseSet< SymbolFile * > &searched_symbol_files, TypeMap &types) override
Definition: SymbolFileNativePDB.cpp:1720
lldb_private::npdb::SymbolFileNativePDB::LineTableEntryComparator::operator()
bool operator()(const lldb_private::LineTable::Entry &lhs, const lldb_private::LineTable::Entry &rhs) const
Definition: SymbolFileNativePDB.h:172
lldb_private::npdb::PdbIndex
PdbIndex - Lazy access to the important parts of a PDB file.
Definition: PdbIndex.h:47
lldb_private::npdb::PdbCompilandSymId
Definition: PdbSymUid.h:44
LLDB_INVALID_UID
#define LLDB_INVALID_UID
Definition: lldb-defines.h:80
lldb_private::npdb::SymbolFileNativePDB::m_index
std::unique_ptr< PdbIndex > m_index
Definition: SymbolFileNativePDB.h:275
lldb_private::npdb::SymbolFileNativePDB::ParseBlocksRecursive
size_t ParseBlocksRecursive(Function &func) override
Definition: SymbolFileNativePDB.cpp:1599
lldb_private::npdb::SymbolFileNativePDB::GetTypes
void GetTypes(SymbolContextScope *sc_scope, lldb::TypeClass type_mask, TypeList &type_list) override
Definition: SymbolFileNativePDB.cpp:2132
lldb_private::npdb::SymbolFileNativePDB::GetOrCreateGlobalVariable
lldb::VariableSP GetOrCreateGlobalVariable(PdbGlobalSymId var_id)
Definition: SymbolFileNativePDB.cpp:966
lldb_private::npdb::SymbolFileNativePDB::CreateFunction
lldb::FunctionSP CreateFunction(PdbCompilandSymId func_id, CompileUnit &comp_unit)
Definition: SymbolFileNativePDB.cpp:470
lldb_private::npdb::SymbolFileNativePDB::CreateConstantSymbol
lldb::VariableSP CreateConstantSymbol(PdbGlobalSymId var_id, const llvm::codeview::CVSymbol &cvs)
Definition: SymbolFileNativePDB.cpp:934
lldb_private::npdb::SymbolFileNativePDB::InlineSite::InlineSite
InlineSite(PdbCompilandSymId parent_id)
Definition: SymbolFileNativePDB.h:187
lldb_private::SymbolContextList
Definition: SymbolContext.h:379
lldb_private::CompilerDecl
Represents a generic declaration such as a function declaration.
Definition: CompilerDecl.h:28
lldb_private::npdb::SymbolFileNativePDB::ResolveSymbolContext
uint32_t ResolveSymbolContext(const Address &so_addr, lldb::SymbolContextItem resolve_scope, SymbolContext &sc) override
lldb_private::npdb::SymbolFileNativePDB::GetOrCreateType
lldb::TypeSP GetOrCreateType(PdbTypeSymId type_id)
Definition: SymbolFileNativePDB.cpp:831
CompileUnitIndex.h
lldb_private::npdb::SymbolFileNativePDB::m_obj_load_address
lldb::addr_t m_obj_load_address
Definition: SymbolFileNativePDB.h:268
lldb_private::Stream
Definition: Stream.h:28
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
lldb_private::npdb::SymbolFileNativePDB::GetDeclContextForUID
CompilerDeclContext GetDeclContextForUID(lldb::user_id_t uid) override
Definition: SymbolFileNativePDB.cpp:2052
lldb_private::npdb::SymbolFileNativePDB::CreateTagType
lldb::TypeSP CreateTagType(PdbTypeSymId type_id, const llvm::codeview::ClassRecord &cr, CompilerType ct)
lldb_private::npdb::SymbolFileNativePDB::CreateInstance
static SymbolFile * CreateInstance(lldb::ObjectFileSP objfile_sp)
Definition: SymbolFileNativePDB.cpp:296
lldb_private::npdb::SymbolFileNativePDB::CreateCompileUnit
lldb::CompUnitSP CreateCompileUnit(const CompilandIndexItem &cci)
Definition: SymbolFileNativePDB.cpp:518
lldb_private::SymbolFileCommon
Containing protected virtual methods for child classes to override.
Definition: SymbolFile.h:424
lldb_private::SymbolContext
Definition: SymbolContext.h:33
lldb_private::npdb::SymbolFileNativePDB::ResolveTypeUID
Type * ResolveTypeUID(lldb::user_id_t type_uid) override
Definition: SymbolFileNativePDB.cpp:2085
lldb_private::npdb::SymbolFileNativePDB::CompleteType
bool CompleteType(CompilerType &compiler_type) override
Definition: SymbolFileNativePDB.cpp:2114
lldb_private::npdb::SymbolFileNativePDB::InlineSite::line_entries
std::vector< lldb_private::LineTable::Entry > line_entries
Definition: SymbolFileNativePDB.h:186
lldb_private::VariableList
Definition: VariableList.h:18
PdbIndex.h
lldb_private::npdb::SymbolFileNativePDB::ParseImportedModules
bool ParseImportedModules(const SymbolContext &sc, std::vector< lldb_private::SourceModule > &imported_modules) override
Definition: SymbolFileNativePDB.cpp:1389
lldb_private::npdb::SymbolFileNativePDB::GetDeclContextContainingUID
CompilerDeclContext GetDeclContextContainingUID(lldb::user_id_t uid) override
Definition: SymbolFileNativePDB.cpp:2070
lldb_private::CompileUnit
Definition: CompileUnit.h:38
lldb_private::npdb::SymbolFileNativePDB::anonymous_id
lldb::user_id_t anonymous_id
Definition: SymbolFileNativePDB.h:272
lldb_private::Module::LookupInfo
Definition: Module.h:936
lldb_private::npdb::SymbolFileNativePDB::CreateLocalVariable
lldb::VariableSP CreateLocalVariable(PdbCompilandSymId scope_id, PdbCompilandSymId var_id, bool is_param)
Definition: SymbolFileNativePDB.cpp:1807
lldb_private::Function
Definition: Function.h:409
lldb_private::npdb::SymbolFileNativePDB::GetDynamicArrayInfoForUID
llvm::Optional< ArrayInfo > GetDynamicArrayInfoForUID(lldb::user_id_t type_uid, const lldb_private::ExecutionContext *exe_ctx) override
If type_uid points to an array type, return its characteristics.
Definition: SymbolFileNativePDB.cpp:2109
lldb_private::npdb::SymbolFileNativePDB::InlineSite::ranges
RangeSourceLineVector ranges
Definition: SymbolFileNativePDB.h:185
lldb_private::npdb::SymbolFileNativePDB::ParseSymbolArrayInScope
size_t ParseSymbolArrayInScope(PdbCompilandSymId parent, llvm::function_ref< bool(llvm::codeview::SymbolKind, PdbCompilandSymId)> fn)
Definition: SymbolFileNativePDB.cpp:1622
lldb_private::npdb::PdbGlobalSymId
Definition: PdbSymUid.h:57
lldb_private::npdb::SymbolFileNativePDB::m_inline_sites
llvm::DenseMap< lldb::user_id_t, std::shared_ptr< InlineSite > > m_inline_sites
Definition: SymbolFileNativePDB.h:283
lldb_private::npdb::SymbolFileNativePDB::GetPluginName
llvm::StringRef GetPluginName() override
Definition: SymbolFileNativePDB.h:158
lldb_private::npdb::SymbolFileNativePDB::CreateTypedef
lldb::TypeSP CreateTypedef(PdbGlobalSymId id)
Definition: SymbolFileNativePDB.cpp:1875
lldb_private::npdb::SymbolFileNativePDB::m_global_vars
llvm::DenseMap< lldb::user_id_t, lldb::VariableSP > m_global_vars
Definition: SymbolFileNativePDB.h:277
lldb_private::npdb::SymbolFileNativePDB::GetParentType
llvm::Optional< llvm::codeview::TypeIndex > GetParentType(llvm::codeview::TypeIndex ti)
Definition: SymbolFileNativePDB.cpp:2323
lldb_private::npdb::SymbolFileNativePDB::ParseVariablesForContext
size_t ParseVariablesForContext(const SymbolContext &sc) override
Definition: SymbolFileNativePDB.cpp:2007
lldb_private::npdb::SymbolFileNativePDB::classof
static bool classof(const SymbolFile *obj)
Definition: SymbolFileNativePDB.h:54
lldb_private::npdb::SymbolFileNativePDB::CreateClassStructUnion
lldb::TypeSP CreateClassStructUnion(PdbTypeSymId type_id, const llvm::codeview::TagRecord &record, size_t size, CompilerType ct)
Definition: SymbolFileNativePDB.cpp:642
lldb_private::npdb::SymbolFileNativePDB::ParseLanguage
lldb::LanguageType ParseLanguage(lldb_private::CompileUnit &comp_unit) override
Definition: SymbolFileNativePDB.cpp:1035
lldb_private::npdb::SymbolFileNativePDB::InlineSite
Definition: SymbolFileNativePDB.h:182
lldb_private::npdb::SymbolFileNativePDB::m_functions
llvm::DenseMap< lldb::user_id_t, lldb::FunctionSP > m_functions
Definition: SymbolFileNativePDB.h:280
lldb_private::npdb::SymbolFileNativePDB::m_local_variables
llvm::DenseMap< lldb::user_id_t, lldb::VariableSP > m_local_variables
Definition: SymbolFileNativePDB.h:278
lldb_private::npdb::SymbolFileNativePDB::FindNamespace
CompilerDeclContext FindNamespace(ConstString name, const CompilerDeclContext &parent_decl_ctx) override
Definition: SymbolFileNativePDB.cpp:2137
lldb_private::npdb::SymbolFileNativePDB::GetTypeSystemForLanguage
llvm::Expected< lldb::TypeSystemSP > GetTypeSystemForLanguage(lldb::LanguageType language) override
Definition: SymbolFileNativePDB.cpp:2143
lldb_private::npdb::SymbolFileNativePDB::m_types
llvm::DenseMap< lldb::user_id_t, lldb::TypeSP > m_types
Definition: SymbolFileNativePDB.h:282
lldb_private::npdb::SymbolFileNativePDB::ParseCompileUnitAtIndex
lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) override
Definition: SymbolFileNativePDB.cpp:1023
lldb_private::ConstString
Definition: ConstString.h:39
lldb_private::npdb::SymbolFileNativePDB::CreatePointerType
lldb::TypeSP CreatePointerType(PdbTypeSymId type_id, const llvm::codeview::PointerRecord &pr, CompilerType ct)
Definition: SymbolFileNativePDB.cpp:560
lldb_private::npdb::SymbolFileNativePDB::DebuggerInitialize
static void DebuggerInitialize(Debugger &debugger)
Definition: SymbolFileNativePDB.cpp:290
lldb_private::npdb::PdbTypeSymId
Definition: PdbSymUid.h:70
lldb_private::npdb::SymbolFileNativePDB::ParseVariablesForBlock
size_t ParseVariablesForBlock(PdbCompilandSymId block_id)
Definition: SymbolFileNativePDB.cpp:1909
lldb_private::npdb::SymbolFileNativePDB::CreateBlock
Block & CreateBlock(PdbCompilandSymId block_id)
Definition: SymbolFileNativePDB.cpp:378
lldb_private::SymbolFile::isA
virtual bool isA(const void *ClassID) const
LLVM RTTI support.
Definition: SymbolFile.h:53
lldb_private::npdb::SymbolFileNativePDB::GetPDBFile
llvm::pdb::PDBFile & GetPDBFile()
Definition: SymbolFileNativePDB.h:160
lldb_private::npdb::SymbolFileNativePDB::FindTypesByName
void FindTypesByName(llvm::StringRef name, uint32_t max_matches, TypeMap &types)
Definition: SymbolFileNativePDB.cpp:1739
lldb_private::npdb::SymbolFileNativePDB::FindFunctions
void FindFunctions(const Module::LookupInfo &lookup_info, const CompilerDeclContext &parent_decl_ctx, bool include_inlines, SymbolContextList &sc_list) override
Definition: SymbolFileNativePDB.cpp:1676
lldb_private::npdb::SymbolFileNativePDB::CreateModifierType
lldb::TypeSP CreateModifierType(PdbTypeSymId type_id, const llvm::codeview::ModifierRecord &mr, CompilerType ct)
Definition: SymbolFileNativePDB.cpp:540
lldb_private::Debugger
Definition: Debugger.h:74
PdbAstBuilder.h
lldb_private::npdb::SymbolFileNativePDB::m_parent_types
llvm::DenseMap< llvm::codeview::TypeIndex, llvm::codeview::TypeIndex > m_parent_types
Definition: SymbolFileNativePDB.h:285
lldb_private::npdb::SymbolFileNativePDB::GetIndex
PdbIndex & GetIndex()
Definition: SymbolFileNativePDB.h:163
lldb_private::npdb::SymbolFileNativePDB::GetOrCreateCompileUnit
lldb::CompUnitSP GetOrCreateCompileUnit(const CompilandIndexItem &cci)
Definition: SymbolFileNativePDB.cpp:992
lldb_private::TypeMap
Definition: TypeMap.h:20
lldb_private::npdb::SymbolFileNativePDB::ParseDeclsForContext
void ParseDeclsForContext(lldb_private::CompilerDeclContext decl_ctx) override
Definition: SymbolFileNativePDB.cpp:1011
lldb_private::CompilerDeclContext
Represents a generic declaration context in a program.
Definition: CompilerDeclContext.h:30
lldb_private::SymbolContextScope
Definition: SymbolContextScope.h:64
lldb_private::npdb::SymbolFileNativePDB::DumpClangAST
void DumpClangAST(Stream &s) override
Definition: SymbolFileNativePDB.cpp:1639
lldb_private::npdb::SymbolFileNativePDB::SymbolFileNativePDB
SymbolFileNativePDB(lldb::ObjectFileSP objfile_sp)
Definition: SymbolFileNativePDB.cpp:300
lldb_private::npdb::SymbolFileNativePDB::ParseFunctions
size_t ParseFunctions(lldb_private::CompileUnit &comp_unit) override
Definition: SymbolFileNativePDB.cpp:1051
lldb_private::npdb::CompilandIndexItem
Represents a single compile unit.
Definition: CompileUnitIndex.h:39
lldb_private::npdb::SymbolFileNativePDB::AddSymbols
void AddSymbols(Symtab &symtab) override
Definition: SymbolFileNativePDB.cpp:1049
lldb_private::npdb::SymbolFileNativePDB::ID
static char ID
LLVM RTTI support.
Definition: SymbolFileNativePDB.h:46
lldb_private::npdb::SymbolFileNativePDB::RangeSourceLineVector
lldb_private::RangeDataVector< uint32_t, uint32_t, int32_t > RangeSourceLineVector
Definition: SymbolFileNativePDB.h:180
lldb_private::Block
Definition: Block.h:41
lldb_private::npdb::SymbolFileNativePDB::m_allocator
llvm::BumpPtrAllocator m_allocator
Definition: SymbolFileNativePDB.h:266
lldb_private::Symtab
Definition: Symtab.h:22
uint32_t
lldb_private::npdb::SymbolFileNativePDB::CalculateAbilities
uint32_t CalculateAbilities() override
Definition: SymbolFileNativePDB.cpp:305
lldb_private::npdb::UdtRecordCompleter
Definition: UdtRecordCompleter.h:39
lldb_private::npdb::SymbolFileNativePDB::GetPluginNameStatic
static llvm::StringRef GetPluginNameStatic()
Definition: SymbolFileNativePDB.h:64
lldb_private::Address
Definition: Address.h:59
lldb_private::npdb::SymbolFileNativePDB::ParseSupportFiles
bool ParseSupportFiles(lldb_private::CompileUnit &comp_unit, FileSpecList &support_files) override
Definition: SymbolFileNativePDB.cpp:1371
lldb_private::npdb::SymbolFileNativePDB::ParseDebugMacros
bool ParseDebugMacros(lldb_private::CompileUnit &comp_unit) override
Definition: SymbolFileNativePDB.cpp:1342
lldb_private::npdb::SymbolFileNativePDB::m_file_up
std::unique_ptr< llvm::pdb::PDBFile > m_file_up
Definition: SymbolFileNativePDB.h:274
lldb_private::npdb::SymbolFileNativePDB::InitializeObject
void InitializeObject() override
Initialize the SymbolFile object.
Definition: SymbolFileNativePDB.cpp:343
lldb_private::RangeDataVector< uint32_t, uint32_t, int32_t >
lldb_private::npdb::SymbolFileNativePDB::InlineSite::parent_id
PdbCompilandSymId parent_id
Definition: SymbolFileNativePDB.h:183
lldb_private::Type
Definition: Type.h:66
LineTable.h
lldb_private::npdb::SymbolFileNativePDB::CalculateNumCompileUnits
uint32_t CalculateNumCompileUnits() override
Definition: SymbolFileNativePDB.cpp:363
lldb_private::npdb::SymbolFileNativePDB::BuildParentMap
void BuildParentMap()
Definition: SymbolFileNativePDB.cpp:2157
lldb_private::npdb::SymbolFileNativePDB::FindGlobalVariables
void FindGlobalVariables(ConstString name, const CompilerDeclContext &parent_decl_ctx, uint32_t max_matches, VariableList &variables) override
Definition: SymbolFileNativePDB.cpp:1650
lldb_private::npdb::SymbolFileNativePDB::CreateAndCacheType
lldb::TypeSP CreateAndCacheType(PdbTypeSymId type_id)
Definition: SymbolFileNativePDB.cpp:777
clang
Definition: ASTResultSynthesizer.h:15
lldb_private::CompilerType
Generic representation of a type in a programming language.
Definition: CompilerType.h:35
lldb_private::npdb::SymbolFileNativePDB::GetOrCreateFunction
lldb::FunctionSP GetOrCreateFunction(PdbCompilandSymId func_id, CompileUnit &comp_unit)
Definition: SymbolFileNativePDB.cpp:982
lldb::user_id_t
uint64_t user_id_t
Definition: lldb-types.h:84
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::npdb::SymbolFileNativePDB::~SymbolFileNativePDB
~SymbolFileNativePDB() override
lldb_private::npdb::SymbolFileNativePDB::InlineSite::inline_function_info
std::shared_ptr< InlineFunctionInfo > inline_function_info
Definition: SymbolFileNativePDB.h:184
lldb_private::TypeList
Definition: TypeList.h:20
lldb_private::npdb::SymbolFileNativePDB::ParseVariablesForCompileUnit
size_t ParseVariablesForCompileUnit(CompileUnit &comp_unit, VariableList &variables)
Definition: SymbolFileNativePDB.cpp:1800
lldb_private::LanguageSet
A SmallBitVector that represents a set of source languages (lldb::LanguageType).
Definition: TypeSystem.h:44
lldb_private::npdb::SymbolFileNativePDB::ParseInlineSite
void ParseInlineSite(PdbCompilandSymId inline_site_id, Address func_addr)
Definition: SymbolFileNativePDB.cpp:1395
lldb_private::npdb::SymbolFileNativePDB::CreateProcedureType
lldb::TypeSP CreateProcedureType(PdbTypeSymId type_id, const llvm::codeview::ProcedureRecord &pr, CompilerType ct)
Definition: SymbolFileNativePDB.cpp:708
lldb_private::npdb::SymbolFileNativePDB::FindSymbolScope
llvm::Optional< PdbCompilandSymId > FindSymbolScope(PdbCompilandSymId id)
Definition: SymbolFileNativePDB.cpp:2270
lldb_private::npdb::SymbolFileNativePDB::CreateArrayType
lldb::TypeSP CreateArrayType(PdbTypeSymId type_id, const llvm::codeview::ArrayRecord &ar, CompilerType ct)
Definition: SymbolFileNativePDB.cpp:683
lldb_private::npdb::SymbolFileNativePDB::GetDeclForUID
CompilerDecl GetDeclForUID(lldb::user_id_t uid) override
Definition: SymbolFileNativePDB.cpp:2038
lldb_private::SymbolFileCommon::isA
bool isA(const void *ClassID) const override
LLVM RTTI support.
Definition: SymbolFile.h:431
lldb_private::npdb::SymbolFileNativePDB::m_compilands
llvm::DenseMap< lldb::user_id_t, lldb::CompUnitSP > m_compilands
Definition: SymbolFileNativePDB.h:281
lldb_private::LineTable::Entry
Definition: LineTable.h:209
lldb_private::npdb::SymbolFileNativePDB::GetOrCreateBlock
Block & GetOrCreateBlock(PdbCompilandSymId block_id)
Definition: SymbolFileNativePDB.cpp:1003
lldb_private::npdb::SymbolFileNativePDB::CreateType
lldb::TypeSP CreateType(PdbTypeSymId type_id, CompilerType ct)
Definition: SymbolFileNativePDB.cpp:718
lldb_private::npdb::SymbolFileNativePDB::m_blocks
llvm::DenseMap< lldb::user_id_t, lldb::BlockSP > m_blocks
Definition: SymbolFileNativePDB.h:279
lldb_private::npdb::SymbolFileNativePDB::m_done_full_type_scan
bool m_done_full_type_scan
Definition: SymbolFileNativePDB.h:269
SymbolFile.h
lldb_private::npdb::SymbolFileNativePDB::Initialize
static void Initialize()
Definition: SymbolFileNativePDB.cpp:280
lldb_private::npdb::SymbolFileNativePDB::GetPDBFile
const llvm::pdb::PDBFile & GetPDBFile() const
Definition: SymbolFileNativePDB.h:161
lldb_private::npdb::SymbolFileNativePDB::isA
bool isA(const void *ClassID) const override
LLVM RTTI support.
Definition: SymbolFileNativePDB.h:51
lldb::LanguageType
LanguageType
Programming language type.
Definition: lldb-enumerations.h:437