[go: up one dir, main page]

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

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

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

Methods

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 lookup_and_parse<F>(
    &self,
    address: u64,
    bases: &BaseAddresses,
    frame: EhFrame<R>,
    cb: F
) -> Result<FrameDescriptionEntry<EhFrame<R>, R, R::Offset>> where
    F: FnMut(EhFrameOffset<R::Offset>) -> Result<CommonInformationEntry<EhFrame<R>, R, R::Offset>>, 
[src]

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

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

Example

let table = eh_frame_hdr.table().unwrap();
let fde = table.lookup_and_parse(addr, &bases, eh_frame.clone(),
    |offset| eh_frame.cie_from_offset(&bases, offset))?;

Trait Implementations

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

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'a, R: Debug + Reader + 'a> 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

Blanket Implementations

impl<T> From for T[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

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

type Owned = T