15#ifndef LIEF_DWARF_FUNCTION_H
16#define LIEF_DWARF_FUNCTION_H
62 template <
typename RefT>
95 return static_cast<const Iterator*
>(
this)->
operator*();
99 std::unique_ptr<details::FunctionIt> impl_;
147 std::unique_ptr<Type>
type()
const;
167 std::unique_ptr<Scope>
scope()
const;
175 std::unique_ptr<details::Function> impl_;
Definition DWARF/Function.hpp:53
friend class Iterator
Definition DWARF/Function.hpp:55
pointer operator->() const
Definition DWARF/Function.hpp:57
Iterator operator++(int)
Definition DWARF/Function.hpp:86
details::FunctionIt implementation
Definition DWARF/Function.hpp:51
std::unique_ptr< Function > & reference
Definition DWARF/Function.hpp:50
std::unique_ptr< Function > operator*() const
Iterator(Iterator &&) noexcept
Function * pointer
Definition DWARF/Function.hpp:49
std::unique_ptr< Function > value_type
Definition DWARF/Function.hpp:47
std::ptrdiff_t difference_type
Definition DWARF/Function.hpp:48
Iterator operator--(int)
Definition DWARF/Function.hpp:80
std::bidirectional_iterator_tag iterator_category
Definition DWARF/Function.hpp:46
PointerProxy operator->() const
Definition DWARF/Function.hpp:94
Iterator(const Iterator &)
iterator_range< assembly::Instruction::Iterator > instructions_it
Definition DWARF/Function.hpp:107
instructions_it instructions() const
Disassemble the current function by returning an iterator over the assembly::Instruction.
std::vector< std::unique_ptr< Parameter > > parameters_t
Definition DWARF/Function.hpp:104
vars_it variables() const
Return an iterator of variables (DW_TAG_variable) defined within the scope of this function....
thrown_types_t thrown_types() const
List of exceptions (types) that can be thrown by the function.
std::unique_ptr< Type > type() const
Return the dwarf::Type associated with the return type of this function.
std::unique_ptr< Scope > scope() const
Return the scope in which this function is defined.
Function(std::unique_ptr< details::Function > impl)
std::string name() const
The name of the function (DW_AT_name).
bool is_external() const
Whether the function is defined outside the current compilation unit (DW_AT_external).
result< uint64_t > address() const
Return the address of the function (DW_AT_entry_pc or DW_AT_low_pc).
std::vector< std::unique_ptr< Type > > thrown_types_t
Definition DWARF/Function.hpp:105
iterator_range< Variable::Iterator > vars_it
Iterator over the variables defined in the scope of this function.
Definition DWARF/Function.hpp:103
debug_location_t debug_location() const
Original source code location.
std::vector< range_t > ranges() const
Ranges of virtual addresses owned by this function.
parameters_t parameters() const
Return the function's parameters (including any template parameter).
uint64_t size() const
Return the size taken by this function in the binary.
std::string linkage_name() const
The name of the function which is used for linking (DW_AT_linkage_name).
bool is_artificial() const
Whether this function is created by the compiler and not present in the original source code.
This class represents a DWARF parameter which can be either:
Definition Parameter.hpp:36
This class materializes a scope in which Function, Variable, Type, ... can be defined.
Definition Scope.hpp:33
Definition iterators.hpp:486
Definition DWARF/CompilationUnit.hpp:30
Namespace for the DWARF debug format.
Definition DWARF/CompilationUnit.hpp:28
LIEF namespace.
Definition Abstract/Binary.hpp:40
tl::expected< T, lief_errors > result
Wrapper that contains an Object (T) or an error.
Definition errors.hpp:75
This structure holds a debug location (source filename & line).
Definition debug_loc.hpp:23
#define LIEF_API
Definition visibility.h:41