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