pub struct Function<'a> { /* private fields */ }
Expand description
This structure represents a DWARF function which can be associated with either:
DW_TAG_subprogram
or DW_TAG_inlined_subroutine
.
Implementations§
§impl Function<'_>
impl Function<'_>
pub fn linkage_name(&self) -> String
pub fn linkage_name(&self) -> String
The name of the function which is used for linking (DW_AT_linkage_name
).
This name differs from Function::name
as it is usually mangled. The function
return an empty string if the linkage name is not available.
pub fn address(&self) -> Result<u64, Error>
pub fn address(&self) -> Result<u64, Error>
Return the address of the function (DW_AT_entry_pc
or DW_AT_low_pc
).
pub fn variables(&self) -> Variables<'_> ⓘ
pub fn variables(&self) -> Variables<'_> ⓘ
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.
pub fn is_artificial(&self) -> bool
pub fn is_artificial(&self) -> bool
Whether this function is created by the compiler and not present in the original source code
pub fn debug_location(&self) -> DebugLocation
pub fn debug_location(&self) -> DebugLocation
Original source code location
pub fn return_type(&self) -> Option<Type<'_>>
pub fn return_type(&self) -> Option<Type<'_>>
Return the Type
associated with the return type of this function.
pub fn parameters(&self) -> Parameters<'_> ⓘ
pub fn parameters(&self) -> Parameters<'_> ⓘ
Return an iterator over the Parameter
of this function