Struct gimli::read::EhHdrTable
source · [−]pub struct EhHdrTable<'a, R: Reader> { /* private fields */ }
Expand description
The CFI binary search table that is an optional part of the .eh_frame_hdr
section.
Implementations
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.
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>>,
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>>,
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<'ctx, F, A: UnwindContextStorage<R>>(
&self,
frame: &EhFrame<R>,
bases: &BaseAddresses,
ctx: &'ctx mut UnwindContext<R, A>,
address: u64,
get_cie: F
) -> Result<&'ctx UnwindTableRow<R, A>> where
F: FnMut(&EhFrame<R>, &BaseAddresses, EhFrameOffset<R::Offset>) -> Result<CommonInformationEntry<R>>,
pub fn unwind_info_for_address<'ctx, F, A: UnwindContextStorage<R>>(
&self,
frame: &EhFrame<R>,
bases: &BaseAddresses,
ctx: &'ctx mut UnwindContext<R, A>,
address: u64,
get_cie: F
) -> Result<&'ctx UnwindTableRow<R, A>> where
F: FnMut(&EhFrame<R>, &BaseAddresses, EhFrameOffset<R::Offset>) -> Result<CommonInformationEntry<R>>,
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
Auto Trait Implementations
impl<'a, R> RefUnwindSafe for EhHdrTable<'a, R> where
R: RefUnwindSafe,
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>
impl<'a, R> UnwindSafe for EhHdrTable<'a, R> where
R: RefUnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more