Struct gimli::read::CfiEntriesIter
source · pub struct CfiEntriesIter<'bases, Section, R>where
R: Reader,
Section: UnwindSection<R>,{
section: Section,
bases: &'bases BaseAddresses,
input: R,
}
Expand description
An iterator over CIE and FDE entries in a .debug_frame
or .eh_frame
section.
Some pointers may be encoded relative to various base addresses. Use the
BaseAddresses
parameter to provide them. By
default, none are provided. If a relative pointer is encountered for a base
address that is unknown, an Err
will be returned and iteration will abort.
Can be used with
FallibleIterator
.
use gimli::{BaseAddresses, EhFrame, EndianSlice, NativeEndian, UnwindSection};
let eh_frame = EhFrame::new(read_eh_frame_somehow(), NativeEndian);
// Provide base addresses for relative pointers.
let bases = BaseAddresses::default()
.set_eh_frame_hdr(address_of_eh_frame_hdr_section_in_memory)
.set_eh_frame(address_of_eh_frame_section_in_memory)
.set_text(address_of_text_section_in_memory)
.set_got(address_of_got_section_in_memory);
let mut entries = eh_frame.entries(&bases);
while let Some(entry) = entries.next()? {
do_stuff_with(entry)
}
Fields§
§section: Section
§bases: &'bases BaseAddresses
§input: R
Implementations§
source§impl<'bases, Section, R> CfiEntriesIter<'bases, Section, R>where
R: Reader,
Section: UnwindSection<R>,
impl<'bases, Section, R> CfiEntriesIter<'bases, Section, R>where
R: Reader,
Section: UnwindSection<R>,
Trait Implementations§
source§impl<'bases, Section, R> Clone for CfiEntriesIter<'bases, Section, R>
impl<'bases, Section, R> Clone for CfiEntriesIter<'bases, Section, R>
source§fn clone(&self) -> CfiEntriesIter<'bases, Section, R>
fn clone(&self) -> CfiEntriesIter<'bases, Section, R>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<'bases, Section, R> Freeze for CfiEntriesIter<'bases, Section, R>
impl<'bases, Section, R> RefUnwindSafe for CfiEntriesIter<'bases, Section, R>where
Section: RefUnwindSafe,
R: RefUnwindSafe,
impl<'bases, Section, R> Send for CfiEntriesIter<'bases, Section, R>
impl<'bases, Section, R> Sync for CfiEntriesIter<'bases, Section, R>
impl<'bases, Section, R> Unpin for CfiEntriesIter<'bases, Section, R>
impl<'bases, Section, R> UnwindSafe for CfiEntriesIter<'bases, Section, R>where
Section: UnwindSafe,
R: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more