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: UnwindSection<R>, A: UnwindContextStorage<R>>(
&self,
section: &'a Section,
bases: &'a BaseAddresses,
ctx: &'ctx mut UnwindContext<R, A>
) -> Result<UnwindTable<'a, 'ctx, R, A>>
pub fn rows<'a, 'ctx, Section: UnwindSection<R>, A: UnwindContextStorage<R>>( &self, section: &'a Section, bases: &'a BaseAddresses, ctx: &'ctx mut UnwindContext<R, A> ) -> Result<UnwindTable<'a, 'ctx, R, A>>
Return the table of unwind information for this FDE.
sourcepub fn unwind_info_for_address<'ctx, Section: UnwindSection<R>, A: UnwindContextStorage<R>>(
&self,
section: &Section,
bases: &BaseAddresses,
ctx: &'ctx mut UnwindContext<R, A>,
address: u64
) -> Result<&'ctx UnwindTableRow<R, A>>
pub fn unwind_info_for_address<'ctx, Section: UnwindSection<R>, A: UnwindContextStorage<R>>( &self, section: &Section, bases: &BaseAddresses, ctx: &'ctx mut UnwindContext<R, A>, address: u64 ) -> Result<&'ctx UnwindTableRow<R, A>>
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 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>where
R: Reader<Offset = Offset> + Clone,
Offset: ReaderOffset + Clone,
impl<R, Offset> Clone for FrameDescriptionEntry<R, Offset>where R: Reader<Offset = Offset> + Clone, Offset: ReaderOffset + Clone,
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>where
R: Reader<Offset = Offset> + Debug,
Offset: ReaderOffset + Debug,
impl<R, Offset> Debug for FrameDescriptionEntry<R, Offset>where R: Reader<Offset = Offset> + Debug, Offset: ReaderOffset + Debug,
source§impl<R, Offset> PartialEq<FrameDescriptionEntry<R, Offset>> for FrameDescriptionEntry<R, Offset>where
R: Reader<Offset = Offset> + PartialEq,
Offset: ReaderOffset + PartialEq,
impl<R, Offset> PartialEq<FrameDescriptionEntry<R, Offset>> for FrameDescriptionEntry<R, Offset>where R: Reader<Offset = Offset> + PartialEq, Offset: ReaderOffset + PartialEq,
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 ==
.