pub struct Variable<'a> { /* private fields */ }
Expand description
Return an iterator of the variable DW_TAG_variable
defined within the
scope of this function. This includes regular stack-based variables as
well as static ones.
Implementations§
§impl Variable<'_>
impl Variable<'_>
pub fn linkage_name(&self) -> Option<String>
pub fn linkage_name(&self) -> Option<String>
The name of the variable which is used for linking (DW_AT_linkage_name
).
This name differs from Variable::name
as it is usually mangled.
pub fn address(&self) -> Result<i64, Error>
pub fn address(&self) -> Result<i64, Error>
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 an Error
.
pub fn size(&self) -> Result<u64, Error>
pub fn size(&self) -> Result<u64, Error>
Return the size of the variable (or an Error
if it can’t be
resolved).
This size is defined by its type.
pub fn is_constexpr(&self) -> bool
pub fn is_constexpr(&self) -> bool
Whether it’s a constexpr
variable
pub fn debug_location(&self) -> DebugLocation
pub fn debug_location(&self) -> DebugLocation
The original source location where the variable is defined.
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Variable<'a>
impl<'a> !Send for Variable<'a>
impl<'a> !Sync for Variable<'a>
impl<'a> Unpin for Variable<'a>
impl<'a> UnwindSafe for Variable<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more