| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 1 | //===-- SymbolFilePDB.h -------------------------------------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #ifndef lldb_Plugins_SymbolFile_PDB_SymbolFilePDB_h_ |
| 11 | #define lldb_Plugins_SymbolFile_PDB_SymbolFilePDB_h_ |
| 12 | |
| Aaron Smith | 7ac1c78 | 2018-02-09 05:31:28 +0000 | [diff] [blame] | 13 | #include "lldb/Core/UniqueCStringMap.h" |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 14 | #include "lldb/Symbol/SymbolFile.h" |
| Aaron Smith | cab0d23 | 2018-05-23 01:52:42 +0000 | [diff] [blame] | 15 | #include "lldb/Symbol/VariableList.h" |
| Zachary Turner | fb1a0a0 | 2017-03-06 18:34:25 +0000 | [diff] [blame] | 16 | #include "lldb/Utility/UserID.h" |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 17 | |
| Zachary Turner | 42dff79 | 2016-04-15 00:21:26 +0000 | [diff] [blame] | 18 | #include "llvm/ADT/DenseMap.h" |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 19 | #include "llvm/DebugInfo/PDB/IPDBSession.h" |
| 20 | #include "llvm/DebugInfo/PDB/PDB.h" |
| Aaron Smith | 10a0257 | 2018-01-13 06:58:18 +0000 | [diff] [blame] | 21 | #include "llvm/DebugInfo/PDB/PDBSymbolExe.h" |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 22 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 23 | class SymbolFilePDB : public lldb_private::SymbolFile { |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 24 | public: |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 25 | //------------------------------------------------------------------ |
| 26 | // Static Functions |
| 27 | //------------------------------------------------------------------ |
| 28 | static void Initialize(); |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 29 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 30 | static void Terminate(); |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 31 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 32 | static void DebuggerInitialize(lldb_private::Debugger &debugger); |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 33 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 34 | static lldb_private::ConstString GetPluginNameStatic(); |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 35 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 36 | static const char *GetPluginDescriptionStatic(); |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 37 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 38 | static lldb_private::SymbolFile * |
| 39 | CreateInstance(lldb_private::ObjectFile *obj_file); |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 40 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 41 | //------------------------------------------------------------------ |
| 42 | // Constructors and Destructors |
| 43 | //------------------------------------------------------------------ |
| 44 | SymbolFilePDB(lldb_private::ObjectFile *ofile); |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 45 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 46 | ~SymbolFilePDB() override; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 47 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 48 | uint32_t CalculateAbilities() override; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 49 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 50 | void InitializeObject() override; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 51 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 52 | //------------------------------------------------------------------ |
| 53 | // Compile Unit function calls |
| 54 | //------------------------------------------------------------------ |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 55 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 56 | uint32_t GetNumCompileUnits() override; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 57 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 58 | lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) override; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 59 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 60 | lldb::LanguageType |
| 61 | ParseCompileUnitLanguage(const lldb_private::SymbolContext &sc) override; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 62 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 63 | size_t |
| 64 | ParseCompileUnitFunctions(const lldb_private::SymbolContext &sc) override; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 65 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 66 | bool |
| 67 | ParseCompileUnitLineTable(const lldb_private::SymbolContext &sc) override; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 68 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 69 | bool |
| 70 | ParseCompileUnitDebugMacros(const lldb_private::SymbolContext &sc) override; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 71 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 72 | bool ParseCompileUnitSupportFiles( |
| 73 | const lldb_private::SymbolContext &sc, |
| 74 | lldb_private::FileSpecList &support_files) override; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 75 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 76 | bool ParseImportedModules( |
| 77 | const lldb_private::SymbolContext &sc, |
| 78 | std::vector<lldb_private::ConstString> &imported_modules) override; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 79 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 80 | size_t ParseFunctionBlocks(const lldb_private::SymbolContext &sc) override; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 81 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 82 | size_t ParseTypes(const lldb_private::SymbolContext &sc) override; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 83 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 84 | size_t |
| 85 | ParseVariablesForContext(const lldb_private::SymbolContext &sc) override; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 86 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 87 | lldb_private::Type *ResolveTypeUID(lldb::user_id_t type_uid) override; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 88 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 89 | bool CompleteType(lldb_private::CompilerType &compiler_type) override; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 90 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 91 | lldb_private::CompilerDecl GetDeclForUID(lldb::user_id_t uid) override; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 92 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 93 | lldb_private::CompilerDeclContext |
| 94 | GetDeclContextForUID(lldb::user_id_t uid) override; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 95 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 96 | lldb_private::CompilerDeclContext |
| 97 | GetDeclContextContainingUID(lldb::user_id_t uid) override; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 98 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 99 | void |
| 100 | ParseDeclsForContext(lldb_private::CompilerDeclContext decl_ctx) override; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 101 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 102 | uint32_t ResolveSymbolContext(const lldb_private::Address &so_addr, |
| 103 | uint32_t resolve_scope, |
| 104 | lldb_private::SymbolContext &sc) override; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 105 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 106 | uint32_t |
| 107 | ResolveSymbolContext(const lldb_private::FileSpec &file_spec, uint32_t line, |
| 108 | bool check_inlines, uint32_t resolve_scope, |
| 109 | lldb_private::SymbolContextList &sc_list) override; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 110 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 111 | uint32_t |
| 112 | FindGlobalVariables(const lldb_private::ConstString &name, |
| 113 | const lldb_private::CompilerDeclContext *parent_decl_ctx, |
| Pavel Labath | 34cda14 | 2018-05-31 09:46:26 +0000 | [diff] [blame] | 114 | uint32_t max_matches, |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 115 | lldb_private::VariableList &variables) override; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 116 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 117 | uint32_t FindGlobalVariables(const lldb_private::RegularExpression ®ex, |
| Pavel Labath | 34cda14 | 2018-05-31 09:46:26 +0000 | [diff] [blame] | 118 | uint32_t max_matches, |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 119 | lldb_private::VariableList &variables) override; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 120 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 121 | uint32_t |
| 122 | FindFunctions(const lldb_private::ConstString &name, |
| 123 | const lldb_private::CompilerDeclContext *parent_decl_ctx, |
| 124 | uint32_t name_type_mask, bool include_inlines, bool append, |
| 125 | lldb_private::SymbolContextList &sc_list) override; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 126 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 127 | uint32_t FindFunctions(const lldb_private::RegularExpression ®ex, |
| 128 | bool include_inlines, bool append, |
| 129 | lldb_private::SymbolContextList &sc_list) override; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 130 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 131 | void GetMangledNamesForFunction( |
| 132 | const std::string &scope_qualified_name, |
| 133 | std::vector<lldb_private::ConstString> &mangled_names) override; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 134 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 135 | uint32_t |
| 136 | FindTypes(const lldb_private::SymbolContext &sc, |
| 137 | const lldb_private::ConstString &name, |
| 138 | const lldb_private::CompilerDeclContext *parent_decl_ctx, |
| 139 | bool append, uint32_t max_matches, |
| 140 | llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files, |
| 141 | lldb_private::TypeMap &types) override; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 142 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 143 | size_t FindTypes(const std::vector<lldb_private::CompilerContext> &context, |
| 144 | bool append, lldb_private::TypeMap &types) override; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 145 | |
| Aaron Smith | 364cbfe | 2017-12-28 06:29:59 +0000 | [diff] [blame] | 146 | void FindTypesByRegex(const lldb_private::RegularExpression ®ex, |
| Aaron Smith | c8316ed | 2018-03-22 03:44:51 +0000 | [diff] [blame] | 147 | uint32_t max_matches, lldb_private::TypeMap &types); |
| Aaron Smith | 364cbfe | 2017-12-28 06:29:59 +0000 | [diff] [blame] | 148 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 149 | lldb_private::TypeList *GetTypeList() override; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 150 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 151 | size_t GetTypes(lldb_private::SymbolContextScope *sc_scope, |
| 152 | uint32_t type_mask, |
| 153 | lldb_private::TypeList &type_list) override; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 154 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 155 | lldb_private::TypeSystem * |
| 156 | GetTypeSystemForLanguage(lldb::LanguageType language) override; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 157 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 158 | lldb_private::CompilerDeclContext FindNamespace( |
| 159 | const lldb_private::SymbolContext &sc, |
| 160 | const lldb_private::ConstString &name, |
| 161 | const lldb_private::CompilerDeclContext *parent_decl_ctx) override; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 162 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 163 | lldb_private::ConstString GetPluginName() override; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 164 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 165 | uint32_t GetPluginVersion() override; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 166 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 167 | llvm::pdb::IPDBSession &GetPDBSession(); |
| Zachary Turner | 42dff79 | 2016-04-15 00:21:26 +0000 | [diff] [blame] | 168 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 169 | const llvm::pdb::IPDBSession &GetPDBSession() const; |
| Zachary Turner | 42dff79 | 2016-04-15 00:21:26 +0000 | [diff] [blame] | 170 | |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 171 | private: |
| Aaron Smith | c8316ed | 2018-03-22 03:44:51 +0000 | [diff] [blame] | 172 | lldb::CompUnitSP ParseCompileUnitForUID(uint32_t id, |
| 173 | uint32_t index = UINT32_MAX); |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 174 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 175 | bool ParseCompileUnitLineTable(const lldb_private::SymbolContext &sc, |
| 176 | uint32_t match_line); |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 177 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 178 | void BuildSupportFileIdToSupportFileIndexMap( |
| Aaron Smith | 10a0257 | 2018-01-13 06:58:18 +0000 | [diff] [blame] | 179 | const llvm::pdb::PDBSymbolCompiland &pdb_compiland, |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 180 | llvm::DenseMap<uint32_t, uint32_t> &index_map) const; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 181 | |
| Aleksandr Urakov | 709426b | 2018-09-10 08:08:43 +0000 | [diff] [blame^] | 182 | void FindTypesByName(const std::string &name, |
| 183 | const lldb_private::CompilerDeclContext *parent_decl_ctx, |
| 184 | uint32_t max_matches, lldb_private::TypeMap &types); |
| Zachary Turner | 42dff79 | 2016-04-15 00:21:26 +0000 | [diff] [blame] | 185 | |
| Aaron Smith | cab0d23 | 2018-05-23 01:52:42 +0000 | [diff] [blame] | 186 | std::string GetMangledForPDBData(const llvm::pdb::PDBSymbolData &pdb_data); |
| 187 | |
| 188 | lldb::VariableSP |
| 189 | ParseVariableForPDBData(const lldb_private::SymbolContext &sc, |
| 190 | const llvm::pdb::PDBSymbolData &pdb_data); |
| 191 | |
| 192 | size_t ParseVariables(const lldb_private::SymbolContext &sc, |
| 193 | const llvm::pdb::PDBSymbol &pdb_data, |
| 194 | lldb_private::VariableList *variable_list = nullptr); |
| 195 | |
| Aaron Smith | 7ac1c78 | 2018-02-09 05:31:28 +0000 | [diff] [blame] | 196 | lldb::CompUnitSP |
| 197 | GetCompileUnitContainsAddress(const lldb_private::Address &so_addr); |
| 198 | |
| Aaron Smith | c8316ed | 2018-03-22 03:44:51 +0000 | [diff] [blame] | 199 | typedef std::vector<lldb_private::Type *> TypeCollection; |
| Aaron Smith | 7ac1c78 | 2018-02-09 05:31:28 +0000 | [diff] [blame] | 200 | |
| Aaron Smith | c8316ed | 2018-03-22 03:44:51 +0000 | [diff] [blame] | 201 | void GetTypesForPDBSymbol(const llvm::pdb::PDBSymbol &pdb_symbol, |
| 202 | uint32_t type_mask, |
| 203 | TypeCollection &type_collection); |
| Aaron Smith | 7ac1c78 | 2018-02-09 05:31:28 +0000 | [diff] [blame] | 204 | |
| Aaron Smith | c8316ed | 2018-03-22 03:44:51 +0000 | [diff] [blame] | 205 | lldb_private::Function * |
| 206 | ParseCompileUnitFunctionForPDBFunc(const llvm::pdb::PDBSymbolFunc &pdb_func, |
| 207 | const lldb_private::SymbolContext &sc); |
| Aaron Smith | 7ac1c78 | 2018-02-09 05:31:28 +0000 | [diff] [blame] | 208 | |
| Aaron Smith | e664b5d | 2018-03-19 21:14:19 +0000 | [diff] [blame] | 209 | void GetCompileUnitIndex(const llvm::pdb::PDBSymbolCompiland &pdb_compiland, |
| Aaron Smith | 10a0257 | 2018-01-13 06:58:18 +0000 | [diff] [blame] | 210 | uint32_t &index); |
| 211 | |
| Aaron Smith | 10a0257 | 2018-01-13 06:58:18 +0000 | [diff] [blame] | 212 | std::unique_ptr<llvm::pdb::PDBSymbolCompiland> |
| 213 | GetPDBCompilandByUID(uint32_t uid); |
| 214 | |
| Aaron Smith | 7ac1c78 | 2018-02-09 05:31:28 +0000 | [diff] [blame] | 215 | lldb_private::Mangled |
| Aaron Smith | e664b5d | 2018-03-19 21:14:19 +0000 | [diff] [blame] | 216 | GetMangledForPDBFunc(const llvm::pdb::PDBSymbolFunc &pdb_func); |
| Aaron Smith | 7ac1c78 | 2018-02-09 05:31:28 +0000 | [diff] [blame] | 217 | |
| Aaron Smith | e664b5d | 2018-03-19 21:14:19 +0000 | [diff] [blame] | 218 | bool ResolveFunction(const llvm::pdb::PDBSymbolFunc &pdb_func, |
| Aaron Smith | 7ac1c78 | 2018-02-09 05:31:28 +0000 | [diff] [blame] | 219 | bool include_inlines, |
| 220 | lldb_private::SymbolContextList &sc_list); |
| 221 | |
| 222 | bool ResolveFunction(uint32_t uid, bool include_inlines, |
| 223 | lldb_private::SymbolContextList &sc_list); |
| 224 | |
| 225 | void CacheFunctionNames(); |
| 226 | |
| 227 | bool DeclContextMatchesThisSymbolFile( |
| 228 | const lldb_private::CompilerDeclContext *decl_ctx); |
| 229 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 230 | llvm::DenseMap<uint32_t, lldb::CompUnitSP> m_comp_units; |
| 231 | llvm::DenseMap<uint32_t, lldb::TypeSP> m_types; |
| Aaron Smith | cab0d23 | 2018-05-23 01:52:42 +0000 | [diff] [blame] | 232 | llvm::DenseMap<uint32_t, lldb::VariableSP> m_variables; |
| Zachary Turner | 42dff79 | 2016-04-15 00:21:26 +0000 | [diff] [blame] | 233 | |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 234 | std::vector<lldb::TypeSP> m_builtin_types; |
| 235 | std::unique_ptr<llvm::pdb::IPDBSession> m_session_up; |
| Aaron Smith | 10a0257 | 2018-01-13 06:58:18 +0000 | [diff] [blame] | 236 | std::unique_ptr<llvm::pdb::PDBSymbolExe> m_global_scope_up; |
| Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 237 | uint32_t m_cached_compile_unit_count; |
| 238 | std::unique_ptr<lldb_private::CompilerDeclContext> m_tu_decl_ctx_up; |
| Aaron Smith | 7ac1c78 | 2018-02-09 05:31:28 +0000 | [diff] [blame] | 239 | |
| 240 | lldb_private::UniqueCStringMap<uint32_t> m_func_full_names; |
| 241 | lldb_private::UniqueCStringMap<uint32_t> m_func_base_names; |
| 242 | lldb_private::UniqueCStringMap<uint32_t> m_func_method_names; |
| Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 243 | }; |
| 244 | |
| 245 | #endif // lldb_Plugins_SymbolFile_PDB_SymbolFilePDB_h_ |