LLDB
mainline
llvm-project
lldb
source
Plugins
SymbolFile
DWARF
DWARFASTParser.h
Go to the documentation of this file.
1
//===-- DWARFASTParser.h ----------------------------------------*- C++ -*-===//
2
//
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
6
//
7
//===----------------------------------------------------------------------===//
8
9
#ifndef LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFASTPARSER_H
10
#define LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFASTPARSER_H
11
12
#include "
DWARFDefines.h
"
13
#include "
lldb/Core/PluginInterface.h
"
14
#include "
lldb/Symbol/SymbolFile.h
"
15
#include "
lldb/Symbol/CompilerDecl.h
"
16
#include "
lldb/Symbol/CompilerDeclContext.h
"
17
#include "
lldb/lldb-enumerations.h
"
18
#include <optional>
19
20
namespace
lldb_private
{
21
class
CompileUnit
;
22
class
ExecutionContext
;
23
}
24
25
namespace
lldb_private::plugin
{
26
namespace
dwarf
{
27
class
DWARFDIE
;
28
class
SymbolFileDWARF
;
29
30
class
DWARFASTParser
{
31
public
:
32
enum class
Kind
{
DWARFASTParserClang
};
33
DWARFASTParser
(
Kind
kind) :
m_kind
(kind) {}
34
35
virtual
~DWARFASTParser
() =
default
;
36
37
virtual
lldb::TypeSP
ParseTypeFromDWARF
(
const
SymbolContext
&sc,
38
const
DWARFDIE
&die,
39
bool
*type_is_new_ptr) = 0;
40
41
virtual
ConstString
ConstructDemangledNameFromDWARF
(
const
DWARFDIE
&die) = 0;
42
43
virtual
Function
*
ParseFunctionFromDWARF
(
CompileUnit
&comp_unit,
44
const
DWARFDIE
&die,
45
AddressRanges
ranges) = 0;
46
47
virtual
bool
CompleteTypeFromDWARF
(
const
DWARFDIE
&die,
Type
*type,
48
const
CompilerType
&compiler_type) = 0;
49
50
virtual
CompilerDecl
GetDeclForUIDFromDWARF
(
const
DWARFDIE
&die) = 0;
51
52
virtual
CompilerDeclContext
53
GetDeclContextForUIDFromDWARF
(
const
DWARFDIE
&die) = 0;
54
55
virtual
CompilerDeclContext
56
GetDeclContextContainingUIDFromDWARF
(
const
DWARFDIE
&die) = 0;
57
58
virtual
void
EnsureAllDIEsInDeclContextHaveBeenParsed
(
59
CompilerDeclContext
decl_context) = 0;
60
61
virtual
std::string
GetDIEClassTemplateParams
(
DWARFDIE
die) = 0;
62
63
static
std::optional<SymbolFile::ArrayInfo>
64
ParseChildArrayInfo
(
const
DWARFDIE
&parent_die,
65
const
ExecutionContext
*exe_ctx =
nullptr
);
66
67
lldb_private::Type
*
GetTypeForDIE
(
const
DWARFDIE
&die);
68
69
static
lldb::AccessType
GetAccessTypeFromDWARF
(uint32_t dwarf_accessibility);
70
71
Kind
GetKind
()
const
{
return
m_kind
; }
72
73
private
:
74
const
Kind
m_kind
;
75
};
76
}
// namespace dwarf
77
}
// namespace lldb_private::plugin
78
79
#endif
// LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFASTPARSER_H
CompilerDeclContext.h
CompilerDecl.h
DWARFDefines.h
PluginInterface.h
SymbolFile.h
lldb_private::AddressRanges
Definition
AddressRange.h:254
lldb_private::CompileUnit
A class that describes a compilation unit.
Definition
CompileUnit.h:43
lldb_private::CompilerDeclContext
Represents a generic declaration context in a program.
Definition
CompilerDeclContext.h:31
lldb_private::CompilerDecl
Represents a generic declaration such as a function declaration.
Definition
CompilerDecl.h:28
lldb_private::CompilerType
Generic representation of a type in a programming language.
Definition
CompilerType.h:37
lldb_private::ConstString
A uniqued constant string class.
Definition
ConstString.h:40
lldb_private::ExecutionContext
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
Definition
ExecutionContext.h:304
lldb_private::Function
A class that describes a function.
Definition
Function.h:400
lldb_private::SymbolContext
Defines a symbol context baton that can be handed other debug core functions.
Definition
SymbolContext.h:34
lldb_private::Type
Definition
Type.h:417
lldb_private::plugin::dwarf::DWARFASTParser::EnsureAllDIEsInDeclContextHaveBeenParsed
virtual void EnsureAllDIEsInDeclContextHaveBeenParsed(CompilerDeclContext decl_context)=0
lldb_private::plugin::dwarf::DWARFASTParser::Kind
Kind
Definition
DWARFASTParser.h:32
lldb_private::plugin::dwarf::DWARFASTParser::Kind::DWARFASTParserClang
@ DWARFASTParserClang
Definition
DWARFASTParser.h:32
lldb_private::plugin::dwarf::DWARFASTParser::m_kind
const Kind m_kind
Definition
DWARFASTParser.h:74
lldb_private::plugin::dwarf::DWARFASTParser::CompleteTypeFromDWARF
virtual bool CompleteTypeFromDWARF(const DWARFDIE &die, Type *type, const CompilerType &compiler_type)=0
lldb_private::plugin::dwarf::DWARFASTParser::GetTypeForDIE
lldb_private::Type * GetTypeForDIE(const DWARFDIE &die)
Definition
DWARFASTParser.cpp:104
lldb_private::plugin::dwarf::DWARFASTParser::GetDIEClassTemplateParams
virtual std::string GetDIEClassTemplateParams(DWARFDIE die)=0
lldb_private::plugin::dwarf::DWARFASTParser::DWARFASTParser
DWARFASTParser(Kind kind)
Definition
DWARFASTParser.h:33
lldb_private::plugin::dwarf::DWARFASTParser::~DWARFASTParser
virtual ~DWARFASTParser()=default
lldb_private::plugin::dwarf::DWARFASTParser::GetDeclForUIDFromDWARF
virtual CompilerDecl GetDeclForUIDFromDWARF(const DWARFDIE &die)=0
lldb_private::plugin::dwarf::DWARFASTParser::ParseFunctionFromDWARF
virtual Function * ParseFunctionFromDWARF(CompileUnit &comp_unit, const DWARFDIE &die, AddressRanges ranges)=0
lldb_private::plugin::dwarf::DWARFASTParser::ConstructDemangledNameFromDWARF
virtual ConstString ConstructDemangledNameFromDWARF(const DWARFDIE &die)=0
lldb_private::plugin::dwarf::DWARFASTParser::GetAccessTypeFromDWARF
static lldb::AccessType GetAccessTypeFromDWARF(uint32_t dwarf_accessibility)
Definition
DWARFASTParser.cpp:129
lldb_private::plugin::dwarf::DWARFASTParser::ParseTypeFromDWARF
virtual lldb::TypeSP ParseTypeFromDWARF(const SymbolContext &sc, const DWARFDIE &die, bool *type_is_new_ptr)=0
lldb_private::plugin::dwarf::DWARFASTParser::GetKind
Kind GetKind() const
Definition
DWARFASTParser.h:71
lldb_private::plugin::dwarf::DWARFASTParser::GetDeclContextContainingUIDFromDWARF
virtual CompilerDeclContext GetDeclContextContainingUIDFromDWARF(const DWARFDIE &die)=0
lldb_private::plugin::dwarf::DWARFASTParser::ParseChildArrayInfo
static std::optional< SymbolFile::ArrayInfo > ParseChildArrayInfo(const DWARFDIE &parent_die, const ExecutionContext *exe_ctx=nullptr)
Definition
DWARFASTParser.cpp:25
lldb_private::plugin::dwarf::DWARFASTParser::GetDeclContextForUIDFromDWARF
virtual CompilerDeclContext GetDeclContextForUIDFromDWARF(const DWARFDIE &die)=0
lldb_private::plugin::dwarf::DWARFDIE
Definition
DWARFDIE.h:19
lldb_private::plugin::dwarf::SymbolFileDWARF
Definition
SymbolFileDWARF.h:66
lldb-enumerations.h
lldb_private::plugin::dwarf
Definition
TypeSystem.h:40
lldb_private::plugin
Definition
TypeSystem.h:39
lldb_private
A class that represents a running process on the host machine.
Definition
SBAddressRange.h:14
lldb::AccessType
AccessType
Definition
lldb-enumerations.h:559
lldb::TypeSP
std::shared_ptr< lldb_private::Type > TypeSP
Definition
lldb-forward.h:472
Generated on
for LLDB by
1.14.0