2015-10-20 02:52:10 +08:00
|
|
|
//===-- DWARFASTParserGo.h --------------------------------------*- C++ -*-===//
|
2015-09-15 06:45:11 +08:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef SymbolFileDWARF_DWARFASTParserGo_h_
|
|
|
|
#define SymbolFileDWARF_DWARFASTParserGo_h_
|
|
|
|
|
2015-10-20 02:52:10 +08:00
|
|
|
// C Includes
|
|
|
|
// C++ Includes
|
|
|
|
// Other libraries and framework includes
|
2015-09-15 06:45:11 +08:00
|
|
|
#include "llvm/ADT/DenseMap.h"
|
|
|
|
#include "llvm/ADT/SmallPtrSet.h"
|
|
|
|
#include "llvm/ADT/SmallVector.h"
|
|
|
|
|
2015-10-20 02:52:10 +08:00
|
|
|
// Project includes
|
|
|
|
#include "DWARFASTParser.h"
|
|
|
|
#include "DWARFDIE.h"
|
2016-09-07 04:57:50 +08:00
|
|
|
#include "DWARFDefines.h"
|
|
|
|
#include "lldb/Core/PluginInterface.h"
|
|
|
|
#include "lldb/Symbol/GoASTContext.h"
|
2015-09-15 06:45:11 +08:00
|
|
|
|
|
|
|
class DWARFDebugInfoEntry;
|
|
|
|
class DWARFDIECollection;
|
|
|
|
|
2016-09-07 04:57:50 +08:00
|
|
|
class DWARFASTParserGo : public DWARFASTParser {
|
2015-10-20 02:52:10 +08:00
|
|
|
public:
|
2016-09-07 04:57:50 +08:00
|
|
|
DWARFASTParserGo(lldb_private::GoASTContext &ast);
|
2015-09-15 06:45:11 +08:00
|
|
|
|
2016-09-07 04:57:50 +08:00
|
|
|
~DWARFASTParserGo() override;
|
2015-09-15 06:45:11 +08:00
|
|
|
|
2016-09-07 04:57:50 +08:00
|
|
|
lldb::TypeSP ParseTypeFromDWARF(const lldb_private::SymbolContext &sc,
|
|
|
|
const DWARFDIE &die, lldb_private::Log *log,
|
|
|
|
bool *type_is_new_ptr) override;
|
2015-09-15 06:45:11 +08:00
|
|
|
|
2016-09-07 04:57:50 +08:00
|
|
|
lldb_private::Function *
|
|
|
|
ParseFunctionFromDWARF(const lldb_private::SymbolContext &sc,
|
|
|
|
const DWARFDIE &die) override;
|
2015-09-15 06:45:11 +08:00
|
|
|
|
2016-09-07 04:57:50 +08:00
|
|
|
bool CompleteTypeFromDWARF(const DWARFDIE &die, lldb_private::Type *type,
|
|
|
|
lldb_private::CompilerType &go_type) override;
|
2015-09-15 06:45:11 +08:00
|
|
|
|
2016-09-07 04:57:50 +08:00
|
|
|
lldb_private::CompilerDeclContext
|
|
|
|
GetDeclContextForUIDFromDWARF(const DWARFDIE &die) override {
|
|
|
|
return lldb_private::CompilerDeclContext();
|
|
|
|
}
|
2015-09-15 06:45:11 +08:00
|
|
|
|
2016-09-07 04:57:50 +08:00
|
|
|
lldb_private::CompilerDeclContext
|
|
|
|
GetDeclContextContainingUIDFromDWARF(const DWARFDIE &die) override {
|
|
|
|
return lldb_private::CompilerDeclContext();
|
|
|
|
}
|
2015-09-15 06:45:11 +08:00
|
|
|
|
2016-09-07 04:57:50 +08:00
|
|
|
lldb_private::CompilerDecl
|
|
|
|
GetDeclForUIDFromDWARF(const DWARFDIE &die) override {
|
|
|
|
return lldb_private::CompilerDecl();
|
|
|
|
}
|
2015-09-16 07:44:17 +08:00
|
|
|
|
2016-09-07 04:57:50 +08:00
|
|
|
std::vector<DWARFDIE> GetDIEForDeclContext(
|
|
|
|
lldb_private::CompilerDeclContext decl_context) override {
|
|
|
|
return std::vector<DWARFDIE>();
|
|
|
|
}
|
2015-09-17 02:48:30 +08:00
|
|
|
|
2015-10-20 02:52:10 +08:00
|
|
|
private:
|
2016-09-07 04:57:50 +08:00
|
|
|
size_t ParseChildParameters(
|
|
|
|
const lldb_private::SymbolContext &sc, const DWARFDIE &parent_die,
|
|
|
|
bool &is_variadic,
|
|
|
|
std::vector<lldb_private::CompilerType> &function_param_types);
|
|
|
|
void ParseChildArrayInfo(const lldb_private::SymbolContext &sc,
|
|
|
|
const DWARFDIE &parent_die, int64_t &first_index,
|
|
|
|
std::vector<uint64_t> &element_orders,
|
|
|
|
uint32_t &byte_stride, uint32_t &bit_stride);
|
|
|
|
|
|
|
|
size_t ParseChildMembers(const lldb_private::SymbolContext &sc,
|
|
|
|
const DWARFDIE &die,
|
|
|
|
lldb_private::CompilerType &class_compiler_type);
|
|
|
|
|
|
|
|
lldb_private::GoASTContext &m_ast;
|
2015-09-15 06:45:11 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SymbolFileDWARF_DWARFASTParserGo_h_
|