15#ifndef LIEF_DWARF_FUNCTION_H
16#define LIEF_DWARF_FUNCTION_H
61 template <
typename RefT>
67 Iterator(std::unique_ptr<details::FunctionIt> impl);
94 return static_cast<const Iterator*
>(
this)->
operator*();
98 std::unique_ptr<details::FunctionIt> impl_;
112 std::unique_ptr<Type>
type()
const;
116 std::unique_ptr<details::Parameter> impl_;
155 std::unique_ptr<Type>
type()
const;
161 std::unique_ptr<Scope>
scope()
const;
165 std::unique_ptr<details::Function> impl_;
Definition DWARF/Function.hpp:52
pointer operator->() const
Definition DWARF/Function.hpp:56
Definition DWARF/Function.hpp:43
Iterator operator++(int)
Definition DWARF/Function.hpp:85
details::FunctionIt implementation
Definition DWARF/Function.hpp:50
std::unique_ptr< Function > & reference
Definition DWARF/Function.hpp:49
std::unique_ptr< Function > operator*() const
Iterator(Iterator &&) noexcept
std::unique_ptr< Function > value_type
Definition DWARF/Function.hpp:46
std::ptrdiff_t difference_type
Definition DWARF/Function.hpp:47
Iterator operator--(int)
Definition DWARF/Function.hpp:79
std::bidirectional_iterator_tag iterator_category
Definition DWARF/Function.hpp:45
PointerProxy operator->() const
Definition DWARF/Function.hpp:93
Iterator(const Iterator &)
This class wraps a DWARF function's parameter.
Definition DWARF/Function.hpp:102
std::unique_ptr< Type > type() const
Type of the parameter.
Parameter(Parameter &&other) noexcept
std::string name() const
Name of the parameter.
Parameter & operator=(Parameter &&other) noexcept
Parameter(std::unique_ptr< details::Parameter > impl)
This class represents a DWARF function which can be associated with either: DW_TAG_subprogram or DW_T...
Definition DWARF/Function.hpp:41
vars_it variables() const
Return an iterator of variables (DW_TAG_variable) defined within the scope of this function....
std::vector< Parameter > parameters() const
Return the function's parameters.
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)
result< uint64_t > address() const
Return the address of the function (DW_AT_entry_pc or DW_AT_low_pc).
debug_location_t debug_location() const
Original source code location.
std::vector< range_t > ranges() const
Ranges of virtual addresses owned by this function.
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.
Definition iterators.hpp:486
LIEF namespace.
Definition Abstract/Binary.hpp:32
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