pub struct FrameDescriptionEntry<R, Offset = <R as Reader>::Offset>where
    R: Reader<Offset = Offset>,
    Offset: ReaderOffset,{
    offset: Offset,
    length: Offset,
    format: Format,
    cie: CommonInformationEntry<R, Offset>,
    initial_segment: u64,
    initial_address: u64,
    address_range: u64,
    augmentation: Option<AugmentationData>,
    instructions: R,
}
Expand description

A FrameDescriptionEntry is a set of CFA instructions for an address range.

Fields§

§offset: Offset

The start of this entry within its containing section.

§length: 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.

§format: Format§cie: CommonInformationEntry<R, Offset>

“A constant offset into the .debug_frame section that denotes the CIE that is associated with this FDE.”

This is the CIE at that offset.

§initial_segment: u64

The address of the first location associated with this table entry. If the segment_size field of this FDE’s CIE is non-zero, the initial location is preceded by a segment selector of the given length.

§initial_address: u64§address_range: u64

“The number of bytes of program instructions described by this entry.”

§augmentation: Option<AugmentationData>

The parsed augmentation data, if we have any.

§instructions: R

“A sequence of table defining instructions that are described below.”

This is followed by DW_CFA_nop padding until length bytes of the input are consumed.

Implementations§

source§

impl<R: Reader> FrameDescriptionEntry<R>

source

fn parse_rest<Section, F>( offset: R::Offset, length: R::Offset, format: Format, cie_pointer: Section::Offset, rest: R, section: &Section, bases: &BaseAddresses, get_cie: F ) -> Result<FrameDescriptionEntry<R>>where Section: UnwindSection<R>, F: FnMut(&Section, &BaseAddresses, Section::Offset) -> Result<CommonInformationEntry<R>>,

source

fn parse_addresses( input: &mut R, cie: &CommonInformationEntry<R>, parameters: &PointerEncodingParameters<'_, R> ) -> Result<(u64, u64)>

source

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.

source

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>

Signal Safe Methods

These methods are guaranteed not to allocate, acquire locks, or perform any other signal-unsafe operations.

source

pub fn offset(&self) -> R::Offset

Get the offset of this entry from the start of its containing section.

source

pub fn cie(&self) -> &CommonInformationEntry<R>

Get a reference to this FDE’s CIE.

source

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.

source

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.

source

pub fn initial_address(&self) -> u64

The first address for which this entry has unwind information for.

source

pub fn len(&self) -> u64

The number of bytes of instructions that this entry has unwind information for.

source

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().

source

pub fn lsda(&self) -> Option<Pointer>

The address of this FDE’s language-specific data area (LSDA), if it has any.

source

pub fn is_signal_trampoline(&self) -> bool

Return true if this FDE’s function is a trampoline for a signal handler.

source

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,

source§

fn clone(&self) -> FrameDescriptionEntry<R, Offset>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<R, Offset> Debug for FrameDescriptionEntry<R, Offset>where R: Reader<Offset = Offset> + Debug, Offset: ReaderOffset + Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<R, Offset> Eq for FrameDescriptionEntry<R, Offset>where R: Reader<Offset = Offset> + Eq, Offset: ReaderOffset + Eq,

source§

impl<R, Offset> StructuralEq for FrameDescriptionEntry<R, Offset>where R: Reader<Offset = Offset>, Offset: ReaderOffset,

source§

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§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.