C++

Note

You can also find the Doxygen documentation here: here

inline std::unique_ptr<DebugInfo> LIEF::dwarf::load(const std::string &pdb_path)

Load DWARF file from the given path.

DebugInfo

class DebugInfo : public LIEF::DebugInfo

This class represents a DWARF debug information. It can embed different compilation units which can be accessed through compilation_units() .

This class can be instantiated from LIEF::Binary::debug_info() or load()

Public Types

using compilation_units_it = iterator_range<CompilationUnit::Iterator>

Iterator over the CompilationUnit.

Public Functions

std::unique_ptr<Function> find_function(const std::string &name) const

Try to find the function with the given name (mangled or not)

const DebugInfo& info = ...;
if (auto func = info.find_function("_ZNSt6localeD1Ev")) {
  // Found
}
if (auto func = info.find_function("std::locale::~locale()")) {
  // Found
}
std::unique_ptr<Function> find_function(uint64_t addr) const

Try to find the function at the given virtual address.

std::unique_ptr<Variable> find_variable(const std::string &name) const

Try to find the variable with the given name. This name can be mangled or not.

std::unique_ptr<Variable> find_variable(uint64_t addr) const

Try to find the variable at the given virtual address.

std::unique_ptr<Type> find_type(const std::string &name) const

Try to find the type with the given name.

compilation_units_it compilation_units() const

Iterator on the CompilationUnit embedded in this dwarf.

inline virtual FORMAT format() const override
virtual ~DebugInfo() override = default
DebugInfo(std::unique_ptr<details::DebugInfo> impl)

Public Static Functions

static std::unique_ptr<DebugInfo> from_file(const std::string &path)
static inline bool classof(const LIEF::DebugInfo *info)

CompilationUnit

class CompilationUnit

This class represents a DWARF compilation unit.

Public Types

using functions_it = iterator_range<Function::Iterator>

Iterator over the dwarf::Function.

using types_it = iterator_range<Type::Iterator>

Iterator over the dwarf::Type.

using vars_it = iterator_range<Variable::Iterator>

Iterator over the CompilationUnit’s variables.

Public Functions

CompilationUnit(std::unique_ptr<details::CompilationUnit> impl)
~CompilationUnit()
std::string name() const

Name of the file associated with this compilation unit (e.g. test.cpp) Return an empty string if the name is not found or can’t be resolved.

This value matches the DW_AT_name attribute

std::string producer() const

Information about the program (or library) that generated this compilation unit. For instance, it can output: Debian clang version 17.0.6.

It returns an empty string if the producer is not present or can’t be resolved

This value matches the DW_AT_producer attribute

std::string compilation_dir() const

Return the path to the directory in which the compilation took place for compiling this compilation unit (e.g. /workdir/build)

It returns an empty string if the entry is not present or can’t be resolved

This value matches the DW_AT_comp_dir attribute

Language language() const

Original Language of this compilation unit.

This value matches the DW_AT_language attribute.

uint64_t low_address() const

Return the lowest virtual address owned by this compilation unit.

uint64_t high_address() const

Return the highest virtual address owned by this compilation unit.

uint64_t size() const

Return the size of the compilation unit according to its range of address.

If the compilation is fragmented (i.e. there are some address ranges between the lowest address and the highest that are not owned by the CU), then it returns the sum of all the address ranges owned by this CU.

If the compilation unit is not fragmented, then is basically returns high_address - low_address.

std::vector<range_t> ranges() const

Return a list of address ranges owned by this compilation unit.

If the compilation unit owns a contiguous range, it should return a single range.

std::unique_ptr<Function> find_function(const std::string &name) const

Try to find the function whose name is given in parameter.

The provided name can be demangled

std::unique_ptr<Function> find_function(uint64_t addr) const

Try to find the function at the given address.

std::unique_ptr<Variable> find_variable(uint64_t addr) const

Try to find the Variable at the given address.

std::unique_ptr<Variable> find_variable(const std::string &name) const

Try to find the Variable with the given name.

functions_it functions() const

Return an iterator over the functions implemented in this compilation unit.

Note that this iterator only iterates over the functions that have a concrete implementation in the compilation unit.

For instance with this code:

inline const char* get_secret_env() {
  return getenv("MY_SECRET_ENV");
}

int main() {
  printf("%s", get_secret_env());
  return 0;
}

The iterator will only return one function for main since get_secret_env is inlined and thus, its implementation is located in main.

functions_it imported_functions() const

Return an iterator over the functions imported in this compilation unit but not implemented.

For instance with this code:

#include <cstdio>
int main() {
  printf("Hello\n");
  return 0;
}

printf is imported from the standard libc so the function is returned by the iterator. On the other hand, main() is implemented in this compilation unit so it is not returned by imported_function() but functions().

types_it types() const

Return an iterator over the different types defined in this compilation unit.

vars_it variables() const

Return an iterator over all the variables defined in the this compilation unit:

static int A = 1; // Returned by the iterator
static const char* B = "Hello"; // Returned by the iterator

int get() {
  static int C = 2; // Returned by the iterator
  return C;
}
class Iterator

Public Types

using iterator_category = std::bidirectional_iterator_tag
using value_type = std::unique_ptr<CompilationUnit>
using difference_type = std::ptrdiff_t
using pointer = CompilationUnit*
using reference = std::unique_ptr<CompilationUnit>&
using implementation = details::CompilationUnitIt

Public Functions

Iterator(const Iterator&)
Iterator(Iterator&&) noexcept
Iterator(std::unique_ptr<details::CompilationUnitIt> impl)
~Iterator()
Iterator &operator++()
Iterator &operator--()
inline Iterator operator--(int)
inline Iterator operator++(int)
std::unique_ptr<CompilationUnit> operator*() const
inline PointerProxy operator->() const

Friends

friend bool operator==(const Iterator &LHS, const Iterator &RHS)
inline friend bool operator!=(const Iterator &LHS, const Iterator &RHS)
class PointerProxy

Public Functions

inline pointer operator->() const
class Language

Languages supported by the DWARF (v5) format. See: https://dwarfstd.org/languages.html.

Some languages (like C++11, C++17, ..) have a version (11, 17, …) which is stored in a dedicated attribute: version

Public Types

enum LANG

Values:

enumerator UNKNOWN = 0
enumerator C
enumerator CPP
enumerator RUST
enumerator DART
enumerator MODULA
enumerator FORTRAN
enumerator SWIFT
enumerator D
enumerator JAVA
enumerator COBOL

Public Functions

Language() = default
inline Language(LANG lang, uint32_t version)
inline Language(LANG lang)
Language(const Language&) = default
Language &operator=(const Language&) = default
Language(Language&&) = default
Language &operator=(Language&&) = default
~Language() = default

Public Members

LANG lang = UNKNOWN

The language itself.

uint32_t version = 0

Version of the language (e.g. 17 for C++17)


Function

class Function

This class represents a DWARF function which can be associated with either: DW_TAG_subprogram or DW_TAG_inlined_subroutine.

Public Types

using vars_it = iterator_range<Variable::Iterator>

Iterator over the variables defined in the scope of this function.

using parameters_t = std::vector<std::unique_ptr<Parameter>>
using thrown_types_t = std::vector<std::unique_ptr<Type>>
using instructions_it = iterator_range<assembly::Instruction::Iterator>

Public Functions

Function(std::unique_ptr<details::Function> impl)
std::string name() const

The name of the function (DW_AT_name)

std::string linkage_name() const

The name of the function which is used for linking (DW_AT_linkage_name).

This name differs from name() as it is usually mangled. The function return an empty string if the linkage name is not available.

result<uint64_t> address() const

Return the address of the function (DW_AT_entry_pc or DW_AT_low_pc).

vars_it variables() const

Return an iterator of variables (DW_TAG_variable) defined within the scope of this function. This includes regular stack-based variables as well as static ones.

bool is_artificial() const

Whether this function is created by the compiler and not present in the original source code.

bool is_external() const

Whether the function is defined outside the current compilation unit (DW_AT_external).

uint64_t size() const

Return the size taken by this function in the binary.

std::vector<range_t> ranges() const

Ranges of virtual addresses owned by this function.

debug_location_t debug_location() const

Original source code location.

std::unique_ptr<Type> type() const

Return the dwarf::Type associated with the return type of this function.

parameters_t parameters() const

Return the function’s parameters (including any template parameter)

thrown_types_t thrown_types() const

List of exceptions (types) that can be thrown by the function.

For instance, given this Swift code:

func summarize(_ ratings: [Int]) throws(StatisticsError) {
  // ...
}

thrown_types() returns one element associated with the Type: StatisticsError.

std::unique_ptr<Scope> scope() const

Return the scope in which this function is defined.

instructions_it instructions() const

Disassemble the current function by returning an iterator over the assembly::Instruction.

~Function()
class Iterator

Public Types

using iterator_category = std::bidirectional_iterator_tag
using value_type = std::unique_ptr<Function>
using difference_type = std::ptrdiff_t
using pointer = Function*
using reference = std::unique_ptr<Function>&
using implementation = details::FunctionIt

Public Functions

Iterator(const Iterator&)
Iterator(Iterator&&) noexcept
Iterator(std::unique_ptr<details::FunctionIt> impl)
~Iterator()
Iterator &operator++()
Iterator &operator--()
inline Iterator operator--(int)
inline Iterator operator++(int)
std::unique_ptr<Function> operator*() const
inline PointerProxy operator->() const

Friends

friend bool operator==(const Iterator &LHS, const Iterator &RHS)
inline friend bool operator!=(const Iterator &LHS, const Iterator &RHS)
class PointerProxy

Public Functions

inline pointer operator->() const

Parameter

class Parameter

This class represents a DWARF parameter which can be either:

Subclassed by LIEF::dwarf::parameters::Formal, LIEF::dwarf::parameters::TemplateType, LIEF::dwarf::parameters::TemplateValue

Public Types

enum class KIND

Values:

enumerator UNKNOWN = 0
enumerator TEMPLATE_TYPE

DW_TAG_template_type_parameter.

enumerator TEMPLATE_VALUE

DW_TAG_template_value_parameter.

enumerator FORMAL

DW_TAG_formal_parameter.

Public Functions

Parameter() = delete
Parameter(Parameter &&other)
Parameter &operator=(Parameter &&other)
Parameter &operator=(const Parameter&) = delete
Parameter(const Parameter&) = delete
KIND kind() const
std::string name() const

Name of the parameter.

std::unique_ptr<Type> type() const

Type of this parameter.

template<class T>
inline const T *as() const
virtual ~Parameter()

Public Static Functions

static std::unique_ptr<Parameter> create(std::unique_ptr<details::Parameter> impl)

Formal Parameter

class Formal : public LIEF::dwarf::Parameter

This class represents a regular function parameter.

For instance, given this prototype:

int main(int argc, const char** argv);

The function main has two parameters::Formal parameters:

  1. argc (Parameter::name) typed as int (types::Base from Parameter::type)

  2. argv (Parameter::name) typed as const char** (types::Const from Parameter::type)

Public Functions

~Formal() override = default
Parameter() = delete
Parameter(Parameter &&other)
Parameter(const Parameter&) = delete

Public Static Functions

static inline bool classof(const Parameter *P)

Template Value Parameter

class TemplateValue : public LIEF::dwarf::Parameter

This class represents a template value parameter.

For instance, given this prototype:

template<int X = 5>
void generic();

The function generic has one parameters::TemplateValue parameter: X.

Public Functions

~TemplateValue() override = default
Parameter() = delete
Parameter(Parameter &&other)
Parameter(const Parameter&) = delete

Public Static Functions

static inline bool classof(const Parameter *P)

Template Type Parameter

class TemplateType : public LIEF::dwarf::Parameter

This class represents a template type parameter.

For instance, given this prototype:

template<class Y>
void generic();

The function generic has one parameters::TemplateType parameter: Y.

Public Functions

~TemplateType() override = default
Parameter() = delete
Parameter(Parameter &&other)
Parameter(const Parameter&) = delete

Public Static Functions

static inline bool classof(const Parameter *P)

Scope

class Scope

This class materializes a scope in which Function, Variable, Type, … can be defined.

Public Types

enum class TYPE : uint32_t

Values:

enumerator UNKNOWN = 0
enumerator UNION
enumerator CLASS
enumerator STRUCT
enumerator NAMESPACE
enumerator FUNCTION
enumerator COMPILATION_UNIT

Public Functions

Scope(std::unique_ptr<details::Scope> impl)
std::string name() const

Name of the scope. For instance namespace’s name or function’s name.

std::unique_ptr<Scope> parent() const

Parent scope (if any)

TYPE type() const

The current scope type.

std::string chained(const std::string &sep = "::") const

Represent the whole chain of all (parent) scopes using the provided separator. E.g. ns1::ns2::Class1::Struct2::Type

~Scope()

Variable

class Variable

This class represents a DWARF variable which can be owned by a dwarf::Function or a dwarf::CompilationUnit.

Public Functions

Variable(std::unique_ptr<details::Variable> impl)
std::string name() const

Name of the variable (usually demangled)

std::string linkage_name() const

The name of the variable which is used for linking (DW_AT_linkage_name).

This name differs from name() as it is usually mangled. The function return an empty string if the linkage name is not available.

result<int64_t> address() const

Address of the variable.

If the variable is static, it returns the virtual address where it is defined. If the variable is stack-based, it returns the relative offset from the frame based register.

If the address can’t be resolved, it returns a lief_errors.

result<uint64_t> size() const

Return the size of the variable (or a lief_errors if it can’t be resolved).

This size is defined by its type.

bool is_constexpr() const

Whether it’s a constexpr variable.

debug_location_t debug_location() const

The original source location where the variable is defined.

std::unique_ptr<Type> type() const

Return the type of this variable.

std::unique_ptr<Scope> scope() const

Return the scope in which this variable is defined.

~Variable()
class Iterator

Public Types

using iterator_category = std::bidirectional_iterator_tag
using value_type = std::unique_ptr<Variable>
using difference_type = std::ptrdiff_t
using pointer = Variable*
using reference = std::unique_ptr<Variable>&
using implementation = details::VariableIt

Public Functions

Iterator(const Iterator&)
Iterator(Iterator&&) noexcept
Iterator(std::unique_ptr<details::VariableIt> impl)
~Iterator()
Iterator &operator++()
Iterator &operator--()
inline Iterator operator--(int)
inline Iterator operator++(int)
std::unique_ptr<Variable> operator*() const
inline PointerProxy operator->() const

Friends

friend bool operator==(const Iterator &LHS, const Iterator &RHS)
inline friend bool operator!=(const Iterator &LHS, const Iterator &RHS)
class PointerProxy

Public Functions

inline pointer operator->() const

Type

class Type

This class represents a DWARF Type which includes:

  • DW_TAG_array_type

  • DW_TAG_atomic_type

  • DW_TAG_base_type

  • DW_TAG_class_type

  • DW_TAG_coarray_type

  • DW_TAG_const_type

  • DW_TAG_dynamic_type

  • DW_TAG_enumeration_type

  • DW_TAG_file_type

  • DW_TAG_immutable_type

  • DW_TAG_interface_type

  • DW_TAG_packed_type

  • DW_TAG_pointer_type

  • DW_TAG_ptr_to_member_type

  • DW_TAG_reference_type

  • DW_TAG_restrict_type

  • DW_TAG_rvalue_reference_type

  • DW_TAG_set_type

  • DW_TAG_shared_type

  • DW_TAG_string_type

  • DW_TAG_structure_type

  • DW_TAG_subroutine_type

  • DW_TAG_template_alias

  • DW_TAG_thrown_type

  • DW_TAG_typedef

  • DW_TAG_union_type

  • DW_TAG_unspecified_type

  • DW_TAG_volatile_type

Subclassed by LIEF::dwarf::types::Array, LIEF::dwarf::types::Atomic, LIEF::dwarf::types::Base, LIEF::dwarf::types::ClassLike, LIEF::dwarf::types::Coarray, LIEF::dwarf::types::Const, LIEF::dwarf::types::Dynamic, LIEF::dwarf::types::Enum, LIEF::dwarf::types::File, LIEF::dwarf::types::Immutable, LIEF::dwarf::types::Interface, LIEF::dwarf::types::Pointer, LIEF::dwarf::types::PointerToMember, LIEF::dwarf::types::RValueReference, LIEF::dwarf::types::Reference, LIEF::dwarf::types::Restrict, LIEF::dwarf::types::SetTy, LIEF::dwarf::types::Shared, LIEF::dwarf::types::StringTy, LIEF::dwarf::types::Subroutine, LIEF::dwarf::types::TemplateAlias, LIEF::dwarf::types::Thrown, LIEF::dwarf::types::Typedef, LIEF::dwarf::types::Volatile

Public Types

enum class KIND

Values:

enumerator UNKNOWN = 0
enumerator UNSPECIFIED
enumerator BASE
enumerator CONST_KIND
enumerator CLASS
enumerator ARRAY
enumerator POINTER
enumerator STRUCT
enumerator UNION
enumerator TYPEDEF
enumerator REF
enumerator SET_TYPE
enumerator STRING
enumerator SUBROUTINE
enumerator POINTER_MEMBER
enumerator PACKED
enumerator FILE
enumerator THROWN
enumerator VOLATILE
enumerator RESTRICT
enumerator INTERFACE
enumerator SHARED
enumerator RVALREF
enumerator TEMPLATE_ALIAS
enumerator COARRAY
enumerator DYNAMIC
enumerator ATOMIC
enumerator IMMUTABLE
enumerator ENUM

Public Functions

virtual ~Type()
KIND kind() const
inline bool is_unspecified() const

Whether this type is a DW_TAG_unspecified_type

result<std::string> name() const

Return the type’s name using either DW_AT_name or DW_AT_picture_string (if any).

result<uint64_t> size() const

Return the size of the type or an error if it can’t be computed.

This size should match the equivalent of sizeof(Type).

debug_location_t location() const

Return the debug location where this type is defined.

std::unique_ptr<Scope> scope() const

Return the scope in which this type is defined.

template<class T>
inline const T *as() const

Public Static Functions

static std::unique_ptr<Type> create(std::unique_ptr<details::Type> impl)
class Iterator

Public Types

using iterator_category = std::bidirectional_iterator_tag
using value_type = std::unique_ptr<Type>
using difference_type = std::ptrdiff_t
using pointer = Type*
using reference = std::unique_ptr<Type>&
using implementation = details::TypeIt

Public Functions

Iterator(const Iterator&)
Iterator(Iterator&&) noexcept
Iterator(std::unique_ptr<details::TypeIt> impl)
~Iterator()
Iterator &operator++()
Iterator &operator--()
inline Iterator operator--(int)
inline Iterator operator++(int)
std::unique_ptr<Type> operator*() const
inline PointerProxy operator->() const

Friends

friend bool operator==(const Iterator &LHS, const Iterator &RHS)
inline friend bool operator!=(const Iterator &LHS, const Iterator &RHS)
class PointerProxy

Public Functions

inline pointer operator->() const

Array

class Array : public LIEF::dwarf::Type

This class represents a DW_TAG_array_type

Public Functions

const Type *underlying_type() const

The underlying type of this array.

inline const Type *operator->() const
inline const Type &operator*() const
size_info_t size_info() const

Return information about the size of this array.

This size info is usually embedded in a DW_TAG_subrange_type DIE which is represented by the size_info_t structure.

~Array() override

Public Static Functions

static inline bool classof(const Type *type)
struct size_info_t

Structure that wraps information about the dimension of this array.

Public Functions

inline operator bool() const

Public Members

std::unique_ptr<Type> type = nullptr

Type of the index for this array.

For instance in uint8_t[3] the index type could be set to a size_t.

std::string name

Name of the index (usually not relevant like __ARRAY_SIZE_TYPE__)

size_t size = 0

Size of the array. For instance in uint8_t[3], it returns 3.


Base

class Base : public LIEF::dwarf::Type

This class wraps the DW_TAG_base_type type which can be used &#8212; for instance &#8212; to represent integers or primitive types.

Public Types

enum class ENCODING

Values:

enumerator NONE = 0
enumerator SIGNED

Mirror DW_ATE_signed

enumerator SIGNED_CHAR

Mirror DW_ATE_signed_char

enumerator UNSIGNED

Mirror DW_ATE_unsigned

enumerator UNSIGNED_CHAR

Mirror DW_ATE_unsigned_char

enumerator FLOAT

Mirror DW_ATE_float

enumerator BOOLEAN

Mirror DW_ATE_boolean

enumerator ADDRESS

Mirror DW_ATE_address

Public Functions

ENCODING encoding() const

Describe how the base type is encoded and should be interpreted.

~Base() override

Public Static Functions

static inline bool classof(const Type *type)

ClassLike

class ClassLike : public LIEF::dwarf::Type

This class abstracts a DWARF aggregate: DW_TAG_structure_type, DW_TAG_class_type, DW_TAG_union_type.

Subclassed by LIEF::dwarf::types::Class, LIEF::dwarf::types::Packed, LIEF::dwarf::types::Structure, LIEF::dwarf::types::Union

Public Types

using functions_it = iterator_range<Function::Iterator>

Public Functions

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.

functions_it functions() const

Iterator over the functions defined by the class-like.

~ClassLike() override

Public Static Functions

static inline bool classof(const Type *type)
class Member

This represents a class/struct/union attribute.

Public Functions

Member(std::unique_ptr<details::Member> impl)
Member(Member &&other) noexcept
Member &operator=(Member &&other) noexcept
std::string name() const

Name of the member.

result<uint64_t> offset() const

Offset of the current member in the struct/union/class.

If the offset can’t be resolved it returns a lief_errors

result<uint64_t> bit_offset() const

Offset of the current member in bits the struct/union/class.

This function differs from offset() for aggregates using bit-field declaration:

struct S {
  int flag : 4;
  int opt : 1
};

Usually, offset() * 8 == bit_offset()

If the offset can’t be resolved it returns a lief_errors

std::unique_ptr<Type> type() const

Type of the current member.

bool is_external() const
bool is_declaration() const
~Member()

Structure

class Structure : public LIEF::dwarf::types::ClassLike

This class represents a DWARF struct type (DW_TAG_structure_type)

Public Functions

~Structure() override

Public Static Functions

static inline bool classof(const Type *type)

Class

class Class : public LIEF::dwarf::types::ClassLike

This class represents a DWARF class type (DW_TAG_class_type)

Public Functions

~Class() override

Public Static Functions

static inline bool classof(const Type *type)

Union

class Union : public LIEF::dwarf::types::ClassLike

This class represents a DWARF class type (DW_TAG_union_type)

Public Functions

~Union() override

Public Static Functions

static inline bool classof(const Type *type)

Packed

class Packed : public LIEF::dwarf::types::ClassLike

This class represents a DWARF packed type (DW_TAG_packed_type)

Public Functions

~Packed() override

Public Static Functions

static inline bool classof(const Type *type)

Const

class Const : public LIEF::dwarf::Type

This class represents a DW_TAG_const_type

Public Functions

const Type *underlying_type() const

The underlying type being const-ed.

inline const Type *operator->() const
inline const Type &operator*() const
~Const() override

Public Static Functions

static inline bool classof(const Type *type)

Pointer

class Pointer : public LIEF::dwarf::Type

This class represents a DW_TAG_pointer_type DWARF type.

Public Functions

const Type *underlying_type() const

The type pointed by this pointer.

inline const Type *operator->() const
inline const Type &operator*() const
~Pointer() override

Public Static Functions

static inline bool classof(const Type *type)

Typedef

class Typedef : public LIEF::dwarf::Type

This class represents a DW_TAG_typedef type.

Public Functions

const Type *underlying_type() const

The type aliased by this typedef.

inline const Type *operator->() const
inline const Type &operator*() const
~Typedef() override

Public Static Functions

static inline bool classof(const Type *type)

Atomic

class Atomic : public LIEF::dwarf::Type

This class represents a DW_TAG_atomic_type

Public Functions

const Type *underlying_type() const

The underlying type being atomic.

inline const Type *operator->() const
inline const Type &operator*() const
~Atomic() override

Public Static Functions

static inline bool classof(const Type *type)

Coarray

class Coarray : public LIEF::dwarf::Type

This class represents a DW_TAG_coarray_type

Public Functions

~Coarray() override

Public Static Functions

static inline bool classof(const Type *type)

Dynamic

class Dynamic : public LIEF::dwarf::Type

This class represents a DW_TAG_dynamic_type

Public Functions

~Dynamic() override

Public Static Functions

static inline bool classof(const Type *type)

Enum

class Enum : public LIEF::dwarf::Type

This class represents a DW_TAG_enumeration_type

Public Functions

~Enum() override

Public Static Functions

static inline bool classof(const Type *type)

File

class File : public LIEF::dwarf::Type

This class represents a DW_TAG_file_type

Public Functions

~File() override

Public Static Functions

static inline bool classof(const Type *type)

Immutable

class Immutable : public LIEF::dwarf::Type

This class represents a DW_TAG_immutable_type

Public Functions

const Type *underlying_type() const

The underlying type.

inline const Type *operator->() const
inline const Type &operator*() const
~Immutable() override

Public Static Functions

static inline bool classof(const Type *type)

Interface

class Interface : public LIEF::dwarf::Type

This class represents a DW_TAG_interface_type

Public Functions

~Interface() override

Public Static Functions

static inline bool classof(const Type *type)

PointerToMember

class PointerToMember : public LIEF::dwarf::Type

This class represents a DW_TAG_ptr_to_member_type

Public Functions

const Type *underlying_type() const

The type of the member referenced by this pointer.

inline const Type *operator->() const
inline const Type *operator*() const
std::unique_ptr<Type> containing_type() const

The type that embeds this member.

~PointerToMember() override

Public Static Functions

static inline bool classof(const Type *type)

RValueReference

class RValueReference : public LIEF::dwarf::Type

This class represents a DW_TAG_rvalue_reference_type

Public Functions

const Type *underlying_type() const

The underlying type referenced by this rvalue-type.

inline const Type *operator->() const
inline const Type *operator*() const
~RValueReference() override

Public Static Functions

static inline bool classof(const Type *type)

Reference

class Reference : public LIEF::dwarf::Type

This class represents a DW_TAG_reference_type

Public Functions

const Type *underlying_type() const

The underlying type referenced by this ref-type.

inline const Type *operator->() const
inline const Type *operator*() const
~Reference() override

Public Static Functions

static inline bool classof(const Type *type)

Restrict

class Restrict : public LIEF::dwarf::Type

This class represents a DW_TAG_restrict_type

Public Functions

const Type *underlying_type() const

The underlying type referenced by this restrict-type.

inline const Type *operator->() const
inline const Type *operator*() const
~Restrict() override

Public Static Functions

static inline bool classof(const Type *type)

SetTy

class SetTy : public LIEF::dwarf::Type

This class represents a DW_TAG_set_type

Public Functions

const Type *underlying_type() const

The underlying type referenced by this set-type.

inline const Type *operator->() const
inline const Type *operator*() const
~SetTy() override

Public Static Functions

static inline bool classof(const Type *type)

Shared

class Shared : public LIEF::dwarf::Type

This class represents a DW_TAG_shared_type

Public Functions

const Type *underlying_type() const

The underlying type referenced by this shared-type.

inline const Type *operator->() const
inline const Type *operator*() const
~Shared() override

Public Static Functions

static inline bool classof(const Type *type)

StringTy

class StringTy : public LIEF::dwarf::Type

This class represents a DW_TAG_string_type

Public Functions

~StringTy() override

Public Static Functions

static inline bool classof(const Type *type)

Subroutine

class Subroutine : public LIEF::dwarf::Type

This class represents a DW_TAG_subroutine_type

Public Types

using parameters_t = std::vector<std::unique_ptr<Parameter>>

Public Functions

parameters_t parameters() const

Parameters of this subroutine.

~Subroutine() override

Public Static Functions

static inline bool classof(const Type *type)

TemplateAlias

class TemplateAlias : public LIEF::dwarf::Type

This class represents a DW_TAG_template_alias

Public Types

using parameters_t = std::vector<std::unique_ptr<Parameter>>

Public Functions

const Type *underlying_type() const

The underlying type aliased by this type.

inline const Type *operator->() const
inline const Type &operator*() const
parameters_t parameters() const

Parameters associated with the underlying template.

~TemplateAlias() override

Public Static Functions

static inline bool classof(const Type *type)

Thrown

class Thrown : public LIEF::dwarf::Type

This class represents a DW_TAG_thrown_type

Public Functions

const Type *underlying_type() const

The underlying type being thrown.

inline const Type *operator->() const
inline const Type &operator*() const
~Thrown() override

Public Static Functions

static inline bool classof(const Type *type)

Volatile

class Volatile : public LIEF::dwarf::Type

This class represents a DW_TAG_volatile_type

Public Functions

const Type *underlying_type() const

This underlying type.

inline const Type *operator->() const
inline const Type &operator*() const
~Volatile() override

Public Static Functions

static inline bool classof(const Type *type)