Struct gimli::read::FrameDescriptionEntry
source · [−]pub struct FrameDescriptionEntry<R, Offset = <R as Reader>::Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset, { /* private fields */ }
Expand description
A FrameDescriptionEntry
is a set of CFA instructions for an address range.
Implementations
sourceimpl<R: Reader> FrameDescriptionEntry<R>
impl<R: Reader> FrameDescriptionEntry<R>
sourcepub fn rows<'a, 'ctx, Section: UnwindSection<R>>(
&self,
section: &'a Section,
bases: &'a BaseAddresses,
ctx: &'ctx mut UninitializedUnwindContext<R>
) -> Result<UnwindTable<'a, 'ctx, R>>
pub fn rows<'a, 'ctx, Section: UnwindSection<R>>(
&self,
section: &'a Section,
bases: &'a BaseAddresses,
ctx: &'ctx mut UninitializedUnwindContext<R>
) -> Result<UnwindTable<'a, 'ctx, R>>
Return the table of unwind information for this FDE.
sourcepub fn unwind_info_for_address<'ctx, Section: UnwindSection<R>>(
&self,
section: &Section,
bases: &BaseAddresses,
ctx: &'ctx mut UninitializedUnwindContext<R>,
address: u64
) -> Result<&'ctx UnwindTableRow<R>>
pub fn unwind_info_for_address<'ctx, Section: UnwindSection<R>>(
&self,
section: &Section,
bases: &BaseAddresses,
ctx: &'ctx mut UninitializedUnwindContext<R>,
address: u64
) -> Result<&'ctx UnwindTableRow<R>>
Find the frame unwind information for the given address.
If found, the unwind information is returned along with the reset
context in the form Ok((unwind_info, context))
. If not found,
Err(gimli::Error::NoUnwindInfoForAddress)
is returned. If parsing or
CFI evaluation fails, the error is returned.
sourceimpl<R: Reader> FrameDescriptionEntry<R>
impl<R: Reader> FrameDescriptionEntry<R>
Signal Safe Methods
These methods are guaranteed not to allocate, acquire locks, or perform any other signal-unsafe operations.
sourcepub fn offset(&self) -> R::Offset
pub fn offset(&self) -> R::Offset
Get the offset of this entry from the start of its containing section.
sourcepub fn cie(&self) -> &CommonInformationEntry<R>
pub fn cie(&self) -> &CommonInformationEntry<R>
Get a reference to this FDE’s CIE.
sourcepub fn entry_len(&self) -> R::Offset
pub fn entry_len(&self) -> R::Offset
A constant that gives the number of bytes of the header and instruction stream for this function, not including the length field itself (see Section 7.2.2). The size of the length field plus the value of length must be an integral multiple of the address size.
sourcepub fn instructions<'a, Section>(
&self,
section: &'a Section,
bases: &'a BaseAddresses
) -> CallFrameInstructionIter<'a, R> where
Section: UnwindSection<R>,
pub fn instructions<'a, Section>(
&self,
section: &'a Section,
bases: &'a BaseAddresses
) -> CallFrameInstructionIter<'a, R> where
Section: UnwindSection<R>,
Iterate over this FDE’s instructions.
Will not include the CIE’s initial instructions, if you want those do
fde.cie().instructions()
first.
Can be used with
FallibleIterator
.
sourcepub fn initial_address(&self) -> u64
pub fn initial_address(&self) -> u64
The first address for which this entry has unwind information for.
sourcepub fn len(&self) -> u64
pub fn len(&self) -> u64
The number of bytes of instructions that this entry has unwind information for.
sourcepub fn contains(&self, address: u64) -> bool
pub fn contains(&self, address: u64) -> bool
Return true
if the given address is within this FDE, false
otherwise.
This is equivalent to entry.initial_address() <= address < entry.initial_address() + entry.len()
.
sourcepub fn lsda(&self) -> Option<Pointer>
pub fn lsda(&self) -> Option<Pointer>
The address of this FDE’s language-specific data area (LSDA), if it has any.
sourcepub fn is_signal_trampoline(&self) -> bool
pub fn is_signal_trampoline(&self) -> bool
Return true if this FDE’s function is a trampoline for a signal handler.
sourcepub fn personality(&self) -> Option<Pointer>
pub fn personality(&self) -> Option<Pointer>
Return the address of the FDE’s function’s personality routine handler. The personality routine does language-specific clean up when unwinding the stack frames with the intent to not run them again.
Trait Implementations
sourceimpl<R: Clone, Offset: Clone> Clone for FrameDescriptionEntry<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<R: Clone, Offset: Clone> Clone for FrameDescriptionEntry<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
sourcefn clone(&self) -> FrameDescriptionEntry<R, Offset>
fn clone(&self) -> FrameDescriptionEntry<R, Offset>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<R: Debug, Offset: Debug> Debug for FrameDescriptionEntry<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<R: Debug, Offset: Debug> Debug for FrameDescriptionEntry<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
sourceimpl<R: PartialEq, Offset: PartialEq> PartialEq<FrameDescriptionEntry<R, Offset>> for FrameDescriptionEntry<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<R: PartialEq, Offset: PartialEq> PartialEq<FrameDescriptionEntry<R, Offset>> for FrameDescriptionEntry<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
sourcefn eq(&self, other: &FrameDescriptionEntry<R, Offset>) -> bool
fn eq(&self, other: &FrameDescriptionEntry<R, Offset>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &FrameDescriptionEntry<R, Offset>) -> bool
fn ne(&self, other: &FrameDescriptionEntry<R, Offset>) -> bool
This method tests for !=
.
impl<R: Eq, Offset: Eq> Eq for FrameDescriptionEntry<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<R, Offset> StructuralEq for FrameDescriptionEntry<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<R, Offset> StructuralPartialEq for FrameDescriptionEntry<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
Auto Trait Implementations
impl<R, Offset> RefUnwindSafe for FrameDescriptionEntry<R, Offset> where
Offset: RefUnwindSafe,
R: RefUnwindSafe,
impl<R, Offset> Send for FrameDescriptionEntry<R, Offset> where
Offset: Send,
R: Send,
impl<R, Offset> Sync for FrameDescriptionEntry<R, Offset> where
Offset: Sync,
R: Sync,
impl<R, Offset> Unpin for FrameDescriptionEntry<R, Offset> where
Offset: Unpin,
R: Unpin,
impl<R, Offset> UnwindSafe for FrameDescriptionEntry<R, Offset> where
Offset: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more