| Pavel Labath | 1cf23e1 | 2019-01-11 11:17:51 +0000 | [diff] [blame^] | 1 | //===-- SymbolFileBreakpad.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_BREAKPAD_SYMBOLFILEBREAKPAD_H | 
|  | 11 | #define LLDB_PLUGINS_SYMBOLFILE_BREAKPAD_SYMBOLFILEBREAKPAD_H | 
|  | 12 |  | 
|  | 13 | #include "lldb/Symbol/SymbolFile.h" | 
|  | 14 |  | 
|  | 15 | namespace lldb_private { | 
|  | 16 |  | 
|  | 17 | namespace breakpad { | 
|  | 18 |  | 
|  | 19 | class SymbolFileBreakpad : public SymbolFile { | 
|  | 20 | public: | 
|  | 21 | //------------------------------------------------------------------ | 
|  | 22 | // Static Functions | 
|  | 23 | //------------------------------------------------------------------ | 
|  | 24 | static void Initialize(); | 
|  | 25 | static void Terminate(); | 
|  | 26 | static void DebuggerInitialize(Debugger &debugger) {} | 
|  | 27 | static ConstString GetPluginNameStatic(); | 
|  | 28 |  | 
|  | 29 | static const char *GetPluginDescriptionStatic() { | 
|  | 30 | return "Breakpad debug symbol file reader."; | 
|  | 31 | } | 
|  | 32 |  | 
|  | 33 | static SymbolFile *CreateInstance(ObjectFile *obj_file) { | 
|  | 34 | return new SymbolFileBreakpad(obj_file); | 
|  | 35 | } | 
|  | 36 |  | 
|  | 37 | //------------------------------------------------------------------ | 
|  | 38 | // Constructors and Destructors | 
|  | 39 | //------------------------------------------------------------------ | 
|  | 40 | SymbolFileBreakpad(ObjectFile *object_file) : SymbolFile(object_file) {} | 
|  | 41 |  | 
|  | 42 | ~SymbolFileBreakpad() override {} | 
|  | 43 |  | 
|  | 44 | uint32_t CalculateAbilities() override; | 
|  | 45 |  | 
|  | 46 | void InitializeObject() override {} | 
|  | 47 |  | 
|  | 48 | //------------------------------------------------------------------ | 
|  | 49 | // Compile Unit function calls | 
|  | 50 | //------------------------------------------------------------------ | 
|  | 51 |  | 
|  | 52 | uint32_t GetNumCompileUnits() override; | 
|  | 53 |  | 
|  | 54 | lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) override; | 
|  | 55 |  | 
|  | 56 | lldb::LanguageType | 
|  | 57 | ParseCompileUnitLanguage(const SymbolContext &sc) override { | 
|  | 58 | return lldb::eLanguageTypeUnknown; | 
|  | 59 | } | 
|  | 60 |  | 
|  | 61 | size_t ParseCompileUnitFunctions(const SymbolContext &sc) override; | 
|  | 62 |  | 
|  | 63 | bool ParseCompileUnitLineTable(const SymbolContext &sc) override; | 
|  | 64 |  | 
|  | 65 | bool ParseCompileUnitDebugMacros(const SymbolContext &sc) override { | 
|  | 66 | return false; | 
|  | 67 | } | 
|  | 68 |  | 
|  | 69 | bool ParseCompileUnitSupportFiles(const SymbolContext &sc, | 
|  | 70 | FileSpecList &support_files) override { | 
|  | 71 | return false; | 
|  | 72 | } | 
|  | 73 |  | 
|  | 74 | bool | 
|  | 75 | ParseImportedModules(const SymbolContext &sc, | 
|  | 76 | std::vector<ConstString> &imported_modules) override { | 
|  | 77 | return false; | 
|  | 78 | } | 
|  | 79 |  | 
|  | 80 | size_t ParseFunctionBlocks(const SymbolContext &sc) override { return 0; } | 
|  | 81 |  | 
|  | 82 | uint32_t FindGlobalVariables(const ConstString &name, | 
|  | 83 | const CompilerDeclContext *parent_decl_ctx, | 
|  | 84 | uint32_t max_matches, | 
|  | 85 | VariableList &variables) override { | 
|  | 86 | return 0; | 
|  | 87 | } | 
|  | 88 |  | 
|  | 89 | size_t ParseTypesForCompileUnit(CompileUnit &cu) override { return 0; } | 
|  | 90 | size_t ParseVariablesForContext(const SymbolContext &sc) override { | 
|  | 91 | return 0; | 
|  | 92 | } | 
|  | 93 | Type *ResolveTypeUID(lldb::user_id_t type_uid) override { return nullptr; } | 
|  | 94 | llvm::Optional<ArrayInfo> GetDynamicArrayInfoForUID( | 
|  | 95 | lldb::user_id_t type_uid, | 
|  | 96 | const lldb_private::ExecutionContext *exe_ctx) override { | 
|  | 97 | return llvm::None; | 
|  | 98 | } | 
|  | 99 |  | 
|  | 100 | bool CompleteType(CompilerType &compiler_type) override { return false; } | 
|  | 101 | uint32_t ResolveSymbolContext(const Address &so_addr, | 
|  | 102 | lldb::SymbolContextItem resolve_scope, | 
|  | 103 | SymbolContext &sc) override; | 
|  | 104 |  | 
|  | 105 | size_t GetTypes(SymbolContextScope *sc_scope, lldb::TypeClass type_mask, | 
|  | 106 | TypeList &type_list) override { | 
|  | 107 | return 0; | 
|  | 108 | } | 
|  | 109 |  | 
|  | 110 | uint32_t FindFunctions(const ConstString &name, | 
|  | 111 | const CompilerDeclContext *parent_decl_ctx, | 
|  | 112 | lldb::FunctionNameType name_type_mask, | 
|  | 113 | bool include_inlines, bool append, | 
|  | 114 | SymbolContextList &sc_list) override; | 
|  | 115 |  | 
|  | 116 | uint32_t FindFunctions(const RegularExpression ®ex, bool include_inlines, | 
|  | 117 | bool append, SymbolContextList &sc_list) override; | 
|  | 118 |  | 
|  | 119 | uint32_t FindTypes(const SymbolContext &sc, const ConstString &name, | 
|  | 120 | const CompilerDeclContext *parent_decl_ctx, bool append, | 
|  | 121 | uint32_t max_matches, | 
|  | 122 | llvm::DenseSet<SymbolFile *> &searched_symbol_files, | 
|  | 123 | TypeMap &types) override; | 
|  | 124 |  | 
|  | 125 | size_t FindTypes(const std::vector<CompilerContext> &context, bool append, | 
|  | 126 | TypeMap &types) override; | 
|  | 127 |  | 
|  | 128 | TypeSystem *GetTypeSystemForLanguage(lldb::LanguageType language) override { | 
|  | 129 | return nullptr; | 
|  | 130 | } | 
|  | 131 |  | 
|  | 132 | CompilerDeclContext | 
|  | 133 | FindNamespace(const SymbolContext &sc, const ConstString &name, | 
|  | 134 | const CompilerDeclContext *parent_decl_ctx) override { | 
|  | 135 | return CompilerDeclContext(); | 
|  | 136 | } | 
|  | 137 |  | 
|  | 138 | void AddSymbols(Symtab &symtab) override; | 
|  | 139 |  | 
|  | 140 | ConstString GetPluginName() override { return GetPluginNameStatic(); } | 
|  | 141 | uint32_t GetPluginVersion() override { return 1; } | 
|  | 142 |  | 
|  | 143 | private: | 
|  | 144 | }; | 
|  | 145 |  | 
|  | 146 | } // namespace breakpad | 
|  | 147 | } // namespace lldb_private | 
|  | 148 |  | 
|  | 149 | #endif |