Struct gimli::EhHdrTable [−][src]
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]
impl<'a, R: Reader + 'a> EhHdrTable<'a, R>
pub fn lookup(&self, address: u64, bases: &BaseAddresses) -> Result<Pointer>
[src]
pub fn lookup(&self, address: u64, bases: &BaseAddresses) -> Result<Pointer>
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]
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>>,
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: Debug + Reader + 'a> Debug for EhHdrTable<'a, R>
[src]
impl<'a, R: Debug + Reader + 'a> Debug for EhHdrTable<'a, R>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'a, R: Clone + Reader + 'a> Clone for EhHdrTable<'a, R>
[src]
impl<'a, R: Clone + Reader + 'a> Clone for EhHdrTable<'a, R>
fn clone(&self) -> EhHdrTable<'a, R>
[src]
fn clone(&self) -> EhHdrTable<'a, R>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl<'a, R> Send for EhHdrTable<'a, R> where
R: Sync,
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> Sync for EhHdrTable<'a, R> where
R: Sync,