| 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 | |
| Zachary Turner | ce386e3 | 2019-01-11 18:35:58 +0000 | [diff] [blame] | 56 | lldb::LanguageType ParseLanguage(CompileUnit &comp_unit) override { |
| Pavel Labath | 1cf23e1 | 2019-01-11 11:17:51 +0000 | [diff] [blame] | 57 | return lldb::eLanguageTypeUnknown; |
| 58 | } |
| 59 | |
| Zachary Turner | ce386e3 | 2019-01-11 18:35:58 +0000 | [diff] [blame] | 60 | size_t ParseFunctions(CompileUnit &comp_unit) override; |
| Pavel Labath | 1cf23e1 | 2019-01-11 11:17:51 +0000 | [diff] [blame] | 61 | |
| Zachary Turner | ce386e3 | 2019-01-11 18:35:58 +0000 | [diff] [blame] | 62 | bool ParseLineTable(CompileUnit &comp_unit) override; |
| Pavel Labath | 1cf23e1 | 2019-01-11 11:17:51 +0000 | [diff] [blame] | 63 | |
| Zachary Turner | ce386e3 | 2019-01-11 18:35:58 +0000 | [diff] [blame] | 64 | bool ParseDebugMacros(CompileUnit &comp_unit) override { return false; } |
| 65 | |
| 66 | bool ParseSupportFiles(CompileUnit &comp_unit, |
| 67 | FileSpecList &support_files) override { |
| Pavel Labath | 1cf23e1 | 2019-01-11 11:17:51 +0000 | [diff] [blame] | 68 | return false; |
| 69 | } |
| Zachary Turner | ce386e3 | 2019-01-11 18:35:58 +0000 | [diff] [blame] | 70 | size_t ParseTypes(CompileUnit &cu) override { return 0; } |
| Pavel Labath | 1cf23e1 | 2019-01-11 11:17:51 +0000 | [diff] [blame] | 71 | |
| 72 | bool |
| 73 | ParseImportedModules(const SymbolContext &sc, |
| 74 | std::vector<ConstString> &imported_modules) override { |
| 75 | return false; |
| 76 | } |
| 77 | |
| Zachary Turner | ffc1b8f | 2019-01-14 22:40:41 +0000 | [diff] [blame^] | 78 | size_t ParseBlocksRecursive(Function &func) override { return 0; } |
| Pavel Labath | 1cf23e1 | 2019-01-11 11:17:51 +0000 | [diff] [blame] | 79 | |
| 80 | uint32_t FindGlobalVariables(const ConstString &name, |
| 81 | const CompilerDeclContext *parent_decl_ctx, |
| 82 | uint32_t max_matches, |
| 83 | VariableList &variables) override { |
| 84 | return 0; |
| 85 | } |
| 86 | |
| Pavel Labath | 1cf23e1 | 2019-01-11 11:17:51 +0000 | [diff] [blame] | 87 | size_t ParseVariablesForContext(const SymbolContext &sc) override { |
| 88 | return 0; |
| 89 | } |
| 90 | Type *ResolveTypeUID(lldb::user_id_t type_uid) override { return nullptr; } |
| 91 | llvm::Optional<ArrayInfo> GetDynamicArrayInfoForUID( |
| 92 | lldb::user_id_t type_uid, |
| 93 | const lldb_private::ExecutionContext *exe_ctx) override { |
| 94 | return llvm::None; |
| 95 | } |
| 96 | |
| 97 | bool CompleteType(CompilerType &compiler_type) override { return false; } |
| 98 | uint32_t ResolveSymbolContext(const Address &so_addr, |
| 99 | lldb::SymbolContextItem resolve_scope, |
| 100 | SymbolContext &sc) override; |
| 101 | |
| 102 | size_t GetTypes(SymbolContextScope *sc_scope, lldb::TypeClass type_mask, |
| 103 | TypeList &type_list) override { |
| 104 | return 0; |
| 105 | } |
| 106 | |
| 107 | uint32_t FindFunctions(const ConstString &name, |
| 108 | const CompilerDeclContext *parent_decl_ctx, |
| 109 | lldb::FunctionNameType name_type_mask, |
| 110 | bool include_inlines, bool append, |
| 111 | SymbolContextList &sc_list) override; |
| 112 | |
| 113 | uint32_t FindFunctions(const RegularExpression ®ex, bool include_inlines, |
| 114 | bool append, SymbolContextList &sc_list) override; |
| 115 | |
| 116 | uint32_t FindTypes(const SymbolContext &sc, const ConstString &name, |
| 117 | const CompilerDeclContext *parent_decl_ctx, bool append, |
| 118 | uint32_t max_matches, |
| 119 | llvm::DenseSet<SymbolFile *> &searched_symbol_files, |
| 120 | TypeMap &types) override; |
| 121 | |
| 122 | size_t FindTypes(const std::vector<CompilerContext> &context, bool append, |
| 123 | TypeMap &types) override; |
| 124 | |
| 125 | TypeSystem *GetTypeSystemForLanguage(lldb::LanguageType language) override { |
| 126 | return nullptr; |
| 127 | } |
| 128 | |
| 129 | CompilerDeclContext |
| 130 | FindNamespace(const SymbolContext &sc, const ConstString &name, |
| 131 | const CompilerDeclContext *parent_decl_ctx) override { |
| 132 | return CompilerDeclContext(); |
| 133 | } |
| 134 | |
| 135 | void AddSymbols(Symtab &symtab) override; |
| 136 | |
| 137 | ConstString GetPluginName() override { return GetPluginNameStatic(); } |
| 138 | uint32_t GetPluginVersion() override { return 1; } |
| 139 | |
| 140 | private: |
| 141 | }; |
| 142 | |
| 143 | } // namespace breakpad |
| 144 | } // namespace lldb_private |
| 145 | |
| 146 | #endif |