blob: aa9f97cc13f7822e4bc06f45bf1efbee06d549d7 [file] [log] [blame]
Pavel Labath1cf23e12019-01-11 11:17:51 +00001//===-- SymbolFileBreakpad.h ------------------------------------*- C++ -*-===//
2//
Chandler Carruth2946cd72019-01-19 08:50:56 +00003// 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 Labath1cf23e12019-01-11 11:17:51 +00006//
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
14namespace lldb_private {
15
16namespace breakpad {
17
18class SymbolFileBreakpad : public SymbolFile {
19public:
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 Turnerce386e32019-01-11 18:35:58 +000055 lldb::LanguageType ParseLanguage(CompileUnit &comp_unit) override {
Pavel Labath1cf23e12019-01-11 11:17:51 +000056 return lldb::eLanguageTypeUnknown;
57 }
58
Zachary Turnerce386e32019-01-11 18:35:58 +000059 size_t ParseFunctions(CompileUnit &comp_unit) override;
Pavel Labath1cf23e12019-01-11 11:17:51 +000060
Zachary Turnerce386e32019-01-11 18:35:58 +000061 bool ParseLineTable(CompileUnit &comp_unit) override;
Pavel Labath1cf23e12019-01-11 11:17:51 +000062
Zachary Turnerce386e32019-01-11 18:35:58 +000063 bool ParseDebugMacros(CompileUnit &comp_unit) override { return false; }
64
65 bool ParseSupportFiles(CompileUnit &comp_unit,
66 FileSpecList &support_files) override {
Pavel Labath1cf23e12019-01-11 11:17:51 +000067 return false;
68 }
Zachary Turnerce386e32019-01-11 18:35:58 +000069 size_t ParseTypes(CompileUnit &cu) override { return 0; }
Pavel Labath1cf23e12019-01-11 11:17:51 +000070
71 bool
72 ParseImportedModules(const SymbolContext &sc,
73 std::vector<ConstString> &imported_modules) override {
74 return false;
75 }
76
Zachary Turnerffc1b8f2019-01-14 22:40:41 +000077 size_t ParseBlocksRecursive(Function &func) override { return 0; }
Pavel Labath1cf23e12019-01-11 11:17:51 +000078
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 Labath1cf23e12019-01-11 11:17:51 +000086 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 &regex, bool include_inlines,
113 bool append, SymbolContextList &sc_list) override;
114
Zachary Turner576495e2019-01-14 22:41:21 +0000115 uint32_t FindTypes(const ConstString &name,
Pavel Labath1cf23e12019-01-11 11:17:51 +0000116 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 Turnerc0a246a2019-01-14 22:41:00 +0000129 FindNamespace(const ConstString &name,
Pavel Labath1cf23e12019-01-11 11:17:51 +0000130 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
139private:
140};
141
142} // namespace breakpad
143} // namespace lldb_private
144
145#endif