LLDB mainline
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"
18#include <optional>
19
20namespace lldb_private {
21class CompileUnit;
22class ExecutionContext;
23}
24
25namespace lldb_private::plugin {
26namespace dwarf {
27class DWARFDIE;
28class SymbolFileDWARF;
29
31public:
32 enum class Kind { DWARFASTParserClang };
33 DWARFASTParser(Kind kind) : m_kind(kind) {}
34
35 virtual ~DWARFASTParser() = default;
36
38 const DWARFDIE &die,
39 bool *type_is_new_ptr) = 0;
40
42
44 const DWARFDIE &die,
45 const AddressRange &range) = 0;
46
47 virtual bool CompleteTypeFromDWARF(const DWARFDIE &die, Type *type,
48 CompilerType &compiler_type) = 0;
49
51
54
57
59 CompilerDeclContext decl_context) = 0;
60
62
63 static std::optional<SymbolFile::ArrayInfo>
64 ParseChildArrayInfo(const DWARFDIE &parent_die,
65 const ExecutionContext *exe_ctx = nullptr);
66
68
69 static lldb::AccessType GetAccessTypeFromDWARF(uint32_t dwarf_accessibility);
70
71 Kind GetKind() const { return m_kind; }
72
73private:
74 const Kind m_kind;
75};
76} // namespace dwarf
77} // namespace lldb_private::plugin
78
79#endif // LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFASTPARSER_H
A section + offset based address range class.
Definition: AddressRange.h:25
A class that describes a compilation unit.
Definition: CompileUnit.h:41
Represents a generic declaration context in a program.
Represents a generic declaration such as a function declaration.
Definition: CompilerDecl.h:28
Generic representation of a type in a programming language.
Definition: CompilerType.h:36
A uniqued constant string class.
Definition: ConstString.h:40
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
A class that describes a function.
Definition: Function.h:399
Defines a symbol context baton that can be handed other debug core functions.
Definition: SymbolContext.h:34
virtual ConstString GetDIEClassTemplateParams(const DWARFDIE &die)=0
virtual void EnsureAllDIEsInDeclContextHaveBeenParsed(CompilerDeclContext decl_context)=0
virtual bool CompleteTypeFromDWARF(const DWARFDIE &die, Type *type, CompilerType &compiler_type)=0
lldb_private::Type * GetTypeForDIE(const DWARFDIE &die)
virtual CompilerDecl GetDeclForUIDFromDWARF(const DWARFDIE &die)=0
virtual ConstString ConstructDemangledNameFromDWARF(const DWARFDIE &die)=0
static lldb::AccessType GetAccessTypeFromDWARF(uint32_t dwarf_accessibility)
virtual lldb::TypeSP ParseTypeFromDWARF(const SymbolContext &sc, const DWARFDIE &die, bool *type_is_new_ptr)=0
virtual Function * ParseFunctionFromDWARF(CompileUnit &comp_unit, const DWARFDIE &die, const AddressRange &range)=0
virtual CompilerDeclContext GetDeclContextContainingUIDFromDWARF(const DWARFDIE &die)=0
static std::optional< SymbolFile::ArrayInfo > ParseChildArrayInfo(const DWARFDIE &parent_die, const ExecutionContext *exe_ctx=nullptr)
virtual CompilerDeclContext GetDeclContextForUIDFromDWARF(const DWARFDIE &die)=0
A class that represents a running process on the host machine.
Definition: SBAttachInfo.h:14
std::shared_ptr< lldb_private::Type > TypeSP
Definition: lldb-forward.h:449