[][src]Struct gimli::read::EhHdrTable

pub struct EhHdrTable<'a, R: Reader> { /* fields omitted */ }

The CFI binary search table that is an optional part of the .eh_frame_hdr section.

Implementations

impl<'a, R: Reader + 'a> EhHdrTable<'a, R>[src]

pub fn lookup(&self, address: u64, bases: &BaseAddresses) -> Result<Pointer>[src]

Probably returns a pointer to the FDE for the given address.

This performs a binary search, so if there is no FDE for the given address, this function will return a pointer to any other FDE that's close by.

To be sure, you must call contains on the FDE.

pub fn pointer_to_offset(
    &self,
    ptr: Pointer
) -> Result<EhFrameOffset<R::Offset>>
[src]

Convert a Pointer to a section offset.

This does not support indirect pointers.

pub fn fde_for_address<F>(
    &self,
    frame: &EhFrame<R>,
    bases: &BaseAddresses,
    address: u64,
    get_cie: F
) -> Result<FrameDescriptionEntry<R>> where
    F: FnMut(&EhFrame<R>, &BaseAddresses, EhFrameOffset<R::Offset>) -> Result<CommonInformationEntry<R>>, 
[src]

Returns a parsed FDE for the given address, or NoUnwindInfoForAddress if there are none.

You must provide a function to get its associated CIE. See PartialFrameDescriptionEntry::parse for more information.

Example

let table = eh_frame_hdr.table().unwrap();
let fde = table.fde_for_address(&eh_frame, &bases, addr, EhFrame::cie_from_offset)?;

pub fn unwind_info_for_address<F>(
    &self,
    frame: &EhFrame<R>,
    bases: &BaseAddresses,
    ctx: &mut UninitializedUnwindContext<R>,
    address: u64,
    get_cie: F
) -> Result<UnwindTableRow<R>> where
    F: FnMut(&EhFrame<R>, &BaseAddresses, EhFrameOffset<R::Offset>) -> Result<CommonInformationEntry<R>>, 
[src]

Returns the frame unwind information for the given address, or NoUnwindInfoForAddress if there are none.

You must provide a function to get the associated CIE. See PartialFrameDescriptionEntry::parse for more information.

Trait Implementations

impl<'a, R: Clone + Reader> Clone for EhHdrTable<'a, R>[src]

impl<'a, R: Debug + Reader> Debug for EhHdrTable<'a, R>[src]

Auto Trait Implementations

impl<'a, R> Send for EhHdrTable<'a, R> where
    R: Sync

impl<'a, R> Sync for EhHdrTable<'a, R> where
    R: Sync

impl<'a, R> Unpin for EhHdrTable<'a, R>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.