LIEF: Library to Instrument Executable Formats Version 0.16.0
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
15#ifndef LIEF_DWARF_TYPE_STRUCTURE_H
16#define LIEF_DWARF_TYPE_STRUCTURE_H
39 Member(std::unique_ptr<details::Member> impl);
42 std::string
name()
const;
45 result<uint64_t>
offset()
const;
67 std::unique_ptr<Type>
type()
const;
79 std::unique_ptr<details::Member> impl_;
82 using functions_it = iterator_range<Function::Iterator>;
85 const auto kind = type->
kind();
86 return kind == Type::KIND::CLASS || kind == Type::KIND::STRUCT || kind == Type::KIND::UNION;
88 std::vector<Member>
members()
const;
91 std::unique_ptr<Member>
find_member(uint64_t offset)
const;
104 using ClassLike::ClassLike;
107 return type->
kind() == Type::KIND::STRUCT;
116 using ClassLike::ClassLike;
119 return type->
kind() == Type::KIND::CLASS;
128 using ClassLike::ClassLike;
131 return type->
kind() == Type::KIND::UNION;
140 using ClassLike::ClassLike;
143 return type->
kind() == Type::KIND::PACKED;
Member(std::unique_ptr< details::Member > impl)
std::unique_ptr< Type > type() const
Type of the current member.
Member & operator=(Member &&other) noexcept
Member(Member &&other) noexcept
std::string name() const
Name of the member.
bool is_declaration() const
result< uint64_t > offset() const
Offset of the current member in the struct/union/class.
result< uint64_t > bit_offset() const
Offset of the current member in bits the struct/union/class.
This class abstracts a DWARF aggregate: DW_TAG_structure_type, DW_TAG_class_type, DW_TAG_union_type.
Definition DWARF/types/ClassLike.hpp:32
functions_it functions() const
Iterator over the functions defined by the class-like.
std::vector< Member > members() const
Return the list of all the attributes defined in this class-like type.
std::unique_ptr< Member > find_member(uint64_t offset) const
Try to find the attribute at the given offset.
static bool classof(const Type *type)
Definition DWARF/types/ClassLike.hpp:84
This class represents a DWARF class type (DW_TAG_class_type)
Definition DWARF/types/ClassLike.hpp:114
static bool classof(const Type *type)
Definition DWARF/types/ClassLike.hpp:118
This class represents a DWARF packed type (DW_TAG_packed_type)
Definition DWARF/types/ClassLike.hpp:138
static bool classof(const Type *type)
Definition DWARF/types/ClassLike.hpp:142
This class represents a DWARF struct type (DW_TAG_structure_type)
Definition DWARF/types/ClassLike.hpp:102
static bool classof(const Type *type)
Definition DWARF/types/ClassLike.hpp:106
This class represents a DWARF class type (DW_TAG_union_type)
Definition DWARF/types/ClassLike.hpp:126
static bool classof(const Type *type)
Definition DWARF/types/ClassLike.hpp:130
Definition DWARF/types/ClassLike.hpp:26
Definition DWARF/types/Array.hpp:23
Namespace for the DWARF debug format.
Definition DWARF/CompilationUnit.hpp:28
LIEF namespace.
Definition Abstract/Binary.hpp:36
#define LIEF_API
Definition visibility.h:41