aboutsummaryrefslogtreecommitdiffstats
path: root/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h')
-rw-r--r--source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h84
1 files changed, 46 insertions, 38 deletions
diff --git a/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h b/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h
index 8a0b7645fd0a..a10138cdf92f 100644
--- a/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h
+++ b/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h
@@ -12,6 +12,7 @@
#include "Plugins/ObjectFile/Breakpad/BreakpadRecords.h"
#include "lldb/Core/FileSpecList.h"
#include "lldb/Symbol/LineTable.h"
+#include "lldb/Symbol/PostfixExpression.h"
#include "lldb/Symbol/SymbolFile.h"
#include "lldb/Symbol/UnwindPlan.h"
@@ -31,12 +32,13 @@ public:
return "Breakpad debug symbol file reader.";
}
- static SymbolFile *CreateInstance(ObjectFile *obj_file) {
- return new SymbolFileBreakpad(obj_file);
+ static SymbolFile *CreateInstance(lldb::ObjectFileSP objfile_sp) {
+ return new SymbolFileBreakpad(std::move(objfile_sp));
}
// Constructors and Destructors
- SymbolFileBreakpad(ObjectFile *object_file) : SymbolFile(object_file) {}
+ SymbolFileBreakpad(lldb::ObjectFileSP objfile_sp)
+ : SymbolFile(std::move(objfile_sp)) {}
~SymbolFileBreakpad() override {}
@@ -46,10 +48,6 @@ public:
// Compile Unit function calls
- uint32_t GetNumCompileUnits() override;
-
- lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) override;
-
lldb::LanguageType ParseLanguage(CompileUnit &comp_unit) override {
return lldb::eLanguageTypeUnknown;
}
@@ -72,12 +70,10 @@ public:
size_t ParseBlocksRecursive(Function &func) override { return 0; }
- uint32_t FindGlobalVariables(ConstString name,
- const CompilerDeclContext *parent_decl_ctx,
- uint32_t max_matches,
- VariableList &variables) override {
- return 0;
- }
+ void FindGlobalVariables(ConstString name,
+ const CompilerDeclContext *parent_decl_ctx,
+ uint32_t max_matches,
+ VariableList &variables) override {}
size_t ParseVariablesForContext(const SymbolContext &sc) override {
return 0;
@@ -99,31 +95,30 @@ public:
lldb::SymbolContextItem resolve_scope,
SymbolContextList &sc_list) override;
- size_t GetTypes(SymbolContextScope *sc_scope, lldb::TypeClass type_mask,
- TypeList &type_list) override {
- return 0;
- }
+ void GetTypes(SymbolContextScope *sc_scope, lldb::TypeClass type_mask,
+ TypeList &type_list) override {}
- uint32_t FindFunctions(ConstString name,
- const CompilerDeclContext *parent_decl_ctx,
- lldb::FunctionNameType name_type_mask,
- bool include_inlines, bool append,
- SymbolContextList &sc_list) override;
+ void FindFunctions(ConstString name,
+ const CompilerDeclContext *parent_decl_ctx,
+ lldb::FunctionNameType name_type_mask,
+ bool include_inlines, SymbolContextList &sc_list) override;
- uint32_t FindFunctions(const RegularExpression &regex, bool include_inlines,
- bool append, SymbolContextList &sc_list) override;
+ void FindFunctions(const RegularExpression &regex, bool include_inlines,
+ SymbolContextList &sc_list) override;
- uint32_t FindTypes(ConstString name,
- const CompilerDeclContext *parent_decl_ctx, bool append,
- uint32_t max_matches,
- llvm::DenseSet<SymbolFile *> &searched_symbol_files,
- TypeMap &types) override;
+ void FindTypes(ConstString name, const CompilerDeclContext *parent_decl_ctx,
+ uint32_t max_matches,
+ llvm::DenseSet<SymbolFile *> &searched_symbol_files,
+ TypeMap &types) override;
- size_t FindTypes(const std::vector<CompilerContext> &context, bool append,
- TypeMap &types) override;
+ void FindTypes(llvm::ArrayRef<CompilerContext> pattern, LanguageSet languages,
+ TypeMap &types) override;
- TypeSystem *GetTypeSystemForLanguage(lldb::LanguageType language) override {
- return nullptr;
+ llvm::Expected<TypeSystem &>
+ GetTypeSystemForLanguage(lldb::LanguageType language) override {
+ return llvm::make_error<llvm::StringError>(
+ "SymbolFileBreakpad does not support GetTypeSystemForLanguage",
+ llvm::inconvertibleErrorCode());
}
CompilerDeclContext
@@ -134,6 +129,8 @@ public:
void AddSymbols(Symtab &symtab) override;
+ llvm::Expected<lldb::addr_t> GetParameterStackSize(Symbol &symbol) override;
+
lldb::UnwindPlanSP
GetUnwindPlan(const Address &address,
const RegisterInfoResolver &resolver) override;
@@ -196,15 +193,22 @@ private:
};
- SymbolVendor &GetSymbolVendor();
+ uint32_t CalculateNumCompileUnits() override;
+ lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) override;
+
lldb::addr_t GetBaseFileAddress();
void ParseFileRecords();
void ParseCUData();
void ParseLineTableAndSupportFiles(CompileUnit &cu, CompUnitData &data);
void ParseUnwindData();
- bool ParseUnwindRow(llvm::StringRef unwind_rules,
- const RegisterInfoResolver &resolver,
- UnwindPlan::Row &row);
+ llvm::ArrayRef<uint8_t> SaveAsDWARF(postfix::Node &node);
+ lldb::UnwindPlanSP ParseCFIUnwindPlan(const Bookmark &bookmark,
+ const RegisterInfoResolver &resolver);
+ bool ParseCFIUnwindRow(llvm::StringRef unwind_rules,
+ const RegisterInfoResolver &resolver,
+ UnwindPlan::Row &row);
+ lldb::UnwindPlanSP ParseWinUnwindPlan(const Bookmark &bookmark,
+ const RegisterInfoResolver &resolver);
using CompUnitMap = RangeDataVector<lldb::addr_t, lldb::addr_t, CompUnitData>;
@@ -212,7 +216,11 @@ private:
llvm::Optional<CompUnitMap> m_cu_data;
using UnwindMap = RangeDataVector<lldb::addr_t, lldb::addr_t, Bookmark>;
- llvm::Optional<UnwindMap> m_unwind_data;
+ struct UnwindData {
+ UnwindMap cfi;
+ UnwindMap win;
+ };
+ llvm::Optional<UnwindData> m_unwind_data;
llvm::BumpPtrAllocator m_allocator;
};