blob: e32479594c48a87be85058c13552751a41696129 [file] [log] [blame]
Pavel Labath1cf23e12019-01-11 11:17:51 +00001//===-- 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
15namespace lldb_private {
16
17namespace breakpad {
18
19class SymbolFileBreakpad : public SymbolFile {
20public:
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 Turnerce386e32019-01-11 18:35:58 +000056 lldb::LanguageType ParseLanguage(CompileUnit &comp_unit) override {
Pavel Labath1cf23e12019-01-11 11:17:51 +000057 return lldb::eLanguageTypeUnknown;
58 }
59
Zachary Turnerce386e32019-01-11 18:35:58 +000060 size_t ParseFunctions(CompileUnit &comp_unit) override;
Pavel Labath1cf23e12019-01-11 11:17:51 +000061
Zachary Turnerce386e32019-01-11 18:35:58 +000062 bool ParseLineTable(CompileUnit &comp_unit) override;
Pavel Labath1cf23e12019-01-11 11:17:51 +000063
Zachary Turnerce386e32019-01-11 18:35:58 +000064 bool ParseDebugMacros(CompileUnit &comp_unit) override { return false; }
65
66 bool ParseSupportFiles(CompileUnit &comp_unit,
67 FileSpecList &support_files) override {
Pavel Labath1cf23e12019-01-11 11:17:51 +000068 return false;
69 }
Zachary Turnerce386e32019-01-11 18:35:58 +000070 size_t ParseTypes(CompileUnit &cu) override { return 0; }
Pavel Labath1cf23e12019-01-11 11:17:51 +000071
72 bool
73 ParseImportedModules(const SymbolContext &sc,
74 std::vector<ConstString> &imported_modules) override {
75 return false;
76 }
77
Zachary Turnerffc1b8f2019-01-14 22:40:41 +000078 size_t ParseBlocksRecursive(Function &func) override { return 0; }
Pavel Labath1cf23e12019-01-11 11:17:51 +000079
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 Labath1cf23e12019-01-11 11:17:51 +000087 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 &regex, 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
140private:
141};
142
143} // namespace breakpad
144} // namespace lldb_private
145
146#endif