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§
source§impl<R: Reader> FrameDescriptionEntry<R>
impl<R: Reader> FrameDescriptionEntry<R>
sourcepub fn rows<'a, 'ctx, Section, S>(
&self,
section: &'a Section,
bases: &'a BaseAddresses,
ctx: &'ctx mut UnwindContext<R::Offset, S>,
) -> Result<UnwindTable<'a, 'ctx, R, S>>
pub fn rows<'a, 'ctx, Section, S>( &self, section: &'a Section, bases: &'a BaseAddresses, ctx: &'ctx mut UnwindContext<R::Offset, S>, ) -> Result<UnwindTable<'a, 'ctx, R, S>>
Return the table of unwind information for this FDE.
sourcepub fn unwind_info_for_address<'ctx, Section, S>(
&self,
section: &Section,
bases: &BaseAddresses,
ctx: &'ctx mut UnwindContext<R::Offset, S>,
address: u64,
) -> Result<&'ctx UnwindTableRow<R::Offset, S>>
pub fn unwind_info_for_address<'ctx, Section, S>( &self, section: &Section, bases: &BaseAddresses, ctx: &'ctx mut UnwindContext<R::Offset, S>, address: u64, ) -> Result<&'ctx UnwindTableRow<R::Offset, S>>
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.
source§impl<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 end_address(&self) -> u64
pub fn end_address(&self) -> u64
One more than the last address that this entry has unwind information for.
This uses wrapping arithmetic, so the result may be less than
initial_address
.
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§
source§impl<R, Offset> Clone for FrameDescriptionEntry<R, Offset>
impl<R, Offset> Clone for FrameDescriptionEntry<R, Offset>
source§fn clone(&self) -> FrameDescriptionEntry<R, Offset>
fn clone(&self) -> FrameDescriptionEntry<R, Offset>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<R, Offset> Debug for FrameDescriptionEntry<R, Offset>
impl<R, Offset> Debug for FrameDescriptionEntry<R, Offset>
source§impl<R, Offset> PartialEq for FrameDescriptionEntry<R, Offset>
impl<R, Offset> PartialEq for FrameDescriptionEntry<R, Offset>
source§fn eq(&self, other: &FrameDescriptionEntry<R, Offset>) -> bool
fn eq(&self, other: &FrameDescriptionEntry<R, Offset>) -> bool
self
and other
values to be equal, and is used by ==
.impl<R, Offset> Eq for FrameDescriptionEntry<R, Offset>
impl<R, Offset> StructuralPartialEq for FrameDescriptionEntry<R, Offset>where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
Auto Trait Implementations§
impl<R, Offset> Freeze for FrameDescriptionEntry<R, Offset>
impl<R, Offset> RefUnwindSafe for FrameDescriptionEntry<R, Offset>where
Offset: RefUnwindSafe,
R: RefUnwindSafe,
impl<R, Offset> Send for FrameDescriptionEntry<R, Offset>
impl<R, Offset> Sync for FrameDescriptionEntry<R, Offset>
impl<R, Offset> Unpin for FrameDescriptionEntry<R, Offset>
impl<R, Offset> UnwindSafe for FrameDescriptionEntry<R, Offset>where
Offset: UnwindSafe,
R: UnwindSafe,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.