LIEF: Library to Instrument Executable Formats Version 0.15.1
|
This class represents a DWARF function which can be associated with either: DW_TAG_subprogram
or DW_TAG_inlined_subroutine
.
More...
#include <Function.hpp>
Classes | |
class | Iterator |
class | Parameter |
This class wraps a DWARF function's parameter. More... | |
Public Types | |
using | vars_it = iterator_range<Variable::Iterator> |
Public Member 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 ). | |
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. | |
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. | |
std::vector< Parameter > | parameters () const |
Return the function's parameters. | |
std::unique_ptr< Scope > | scope () const |
Return the scope in which this function is defined. | |
~Function () | |
This class represents a DWARF function which can be associated with either: DW_TAG_subprogram
or DW_TAG_inlined_subroutine
.
LIEF::dwarf::Function::Function | ( | std::unique_ptr< details::Function > | impl | ) |
LIEF::dwarf::Function::~Function | ( | ) |
result< uint64_t > LIEF::dwarf::Function::address | ( | ) | const |
Return the address of the function (DW_AT_entry_pc
or DW_AT_low_pc
).
debug_location_t LIEF::dwarf::Function::debug_location | ( | ) | const |
Original source code location.
bool LIEF::dwarf::Function::is_artificial | ( | ) | const |
Whether this function is created by the compiler and not present in the original source code.
std::string LIEF::dwarf::Function::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.
std::string LIEF::dwarf::Function::name | ( | ) | const |
The name of the function (DW_AT_name
)
std::vector< Parameter > LIEF::dwarf::Function::parameters | ( | ) | const |
Return the function's parameters.
std::vector< range_t > LIEF::dwarf::Function::ranges | ( | ) | const |
Ranges of virtual addresses owned by this function.
std::unique_ptr< Scope > LIEF::dwarf::Function::scope | ( | ) | const |
Return the scope in which this function is defined.
uint64_t LIEF::dwarf::Function::size | ( | ) | const |
Return the size taken by this function in the binary.
std::unique_ptr< Type > LIEF::dwarf::Function::type | ( | ) | const |
Return the dwarf::Type associated with the return type of this function.
vars_it LIEF::dwarf::Function::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.