Struct gimli::CfiEntriesIter
[−]
[src]
pub struct CfiEntriesIter<'bases, 'input, Endian, Section> where Endian: Endianity, Section: UnwindSection<'input, Endian> { /* fields omitted */ }
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, NativeEndian, UnwindSection}; let eh_frame = EhFrame::<NativeEndian>::new(read_eh_frame_somehow()); // Provide base addresses for relative pointers. let bases = BaseAddresses::default() .set_cfi(address_of_cfi_section_in_memory) .set_text(address_of_text_section_in_memory) .set_data(address_of_data_section_in_memory); let mut entries = eh_frame.entries(&bases); while let Some(entry) = try!(entries.next()) { do_stuff_with(entry) }
Methods
impl<'bases, 'input, Endian, Section> CfiEntriesIter<'bases, 'input, Endian, Section> where Endian: Endianity, Section: UnwindSection<'input, Endian>
[src]
fn next(&mut self) -> Result<Option<CieOrFde<'bases, 'input, Endian, Section>>>
Advance the iterator to the next entry.
Trait Implementations
impl<'bases, 'input, Endian: Clone, Section: Clone> Clone for CfiEntriesIter<'bases, 'input, Endian, Section> where Endian: Endianity, Section: UnwindSection<'input, Endian>
[src]
fn clone(&self) -> CfiEntriesIter<'bases, 'input, Endian, Section>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<'bases, 'input, Endian: Debug, Section: Debug> Debug for CfiEntriesIter<'bases, 'input, Endian, Section> where Endian: Endianity, Section: UnwindSection<'input, Endian>
[src]
impl<'bases, 'input, Endian, Section> FallibleIterator for CfiEntriesIter<'bases, 'input, Endian, Section> where Endian: Endianity, Section: UnwindSection<'input, Endian>
[src]
type Item = CieOrFde<'bases, 'input, Endian, Section>
The type being iterated over.
type Error = Error
The error type.
fn next(&mut self) -> Result<Option<Self::Item>, Self::Error>
Advances the iterator and returns the next value. Read more
fn size_hint(&self) -> (usize, Option<usize>)
Returns bounds on the remaining length of the iterator. Read more
fn all<F>(&mut self, f: F) -> Result<bool, Self::Error> where F: FnMut(Self::Item) -> bool
Determines if all elements of this iterator match a predicate.
fn and_then<F, B>(self, f: F) -> AndThen<Self, F> where F: FnMut(Self::Item) -> Result<B, Self::Error>
Returns an iterator which applies a fallible transform to the elements of the underlying iterator. Read more
fn any<F>(&mut self, f: F) -> Result<bool, Self::Error> where F: FnMut(Self::Item) -> bool
Determines if any element of this iterator matches a predicate.
fn by_ref(&mut self) -> &mut Self
Borrow an iterator rather than consuming it. Read more
fn chain<I>(self, it: I) -> Chain<Self, I> where I: IntoFallibleIterator<Item=Self::Item, Error=Self::Error>
Returns an iterator which yields the elements of this iterator followed by another. Read more
fn cloned<'a, T>(self) -> Cloned<Self> where Self: FallibleIterator<Item=&'a T>, T: 'a + Clone
Returns an iterator which clones all of its elements.
fn count(self) -> Result<usize, Self::Error>
Consumes the iterator, returning the number of remaining items.
fn collect<T>(self) -> Result<T, Self::Error> where T: FromFallibleIterator<Self::Item>
Transforms the iterator into a collection. Read more
fn enumerate(self) -> Enumerate<Self>
Returns an iterator which yields the current iteration count as well as the value. Read more
fn filter<F>(self, f: F) -> Filter<Self, F> where F: FnMut(&Self::Item) -> bool
Returns an iterator which uses a predicate to determine which values should be yielded. Read more
fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F> where F: FnMut(Self::Item) -> Option<B>
Returns an iterator which both filters and maps.
fn find<F>(&mut self, f: F) -> Result<Option<Self::Item>, Self::Error> where F: FnMut(&Self::Item) -> bool
Returns the first element of the iterator that matches a predicate.
fn fuse(self) -> Fuse<Self>
Returns an iterator which yields this iterator's elements and ends after the first Ok(None)
. Read more
fn fold<B, F>(self, init: B, f: F) -> Result<B, Self::Error> where F: FnMut(B, Self::Item) -> B
Applies a function over the elements of the iterator, producing a single final value. Read more
fn iterator(self) -> Iterator<Self>
Returns a normal (non-fallible) iterator over Result<Item, Error>
.
fn last(self) -> Result<Option<Self::Item>, Self::Error>
Returns the last element of the iterator.
fn map<B, F>(self, f: F) -> Map<Self, F> where F: FnMut(Self::Item) -> B
Returns an iterator which applies a transform to the elements of the underlying iterator. Read more
fn map_err<B, F>(self, f: F) -> MapErr<Self, F> where F: FnMut(Self::Error) -> B
Returns an iterator which applies a transform to the errors of the underlying iterator. Read more
fn max(self) -> Result<Option<Self::Item>, Self::Error> where Self::Item: Ord
Returns the maximal element of the iterator.
fn max_by_key<B, F>(self, f: F) -> Result<Option<Self::Item>, Self::Error> where B: Ord, F: FnMut(&Self::Item) -> B
Returns the element of the iterator which gives the maximum value from the function. Read more
fn min(self) -> Result<Option<Self::Item>, Self::Error> where Self::Item: Ord
Returns the minimal element of the iterator.
fn min_by_key<B, F>(self, f: F) -> Result<Option<Self::Item>, Self::Error> where B: Ord, F: FnMut(&Self::Item) -> B
Returns the element of the iterator which gives the minimum value from the function. Read more
fn nth(&mut self, n: usize) -> Result<Option<Self::Item>, Self::Error>
Returns the n
th element of the iterator.
fn peekable(self) -> Peekable<Self>
Returns an iterator that can peek at the next element without consuming it. Read more
fn position<F>(&mut self, f: F) -> Result<Option<usize>, Self::Error> where F: FnMut(Self::Item) -> bool
Returns the position of the first element of this iterator that matches a predicate. Read more
fn rev(self) -> Rev<Self> where Self: DoubleEndedFallibleIterator
Returns an iterator that yields this iterator's items in the opposite order. Read more
fn take(self, n: usize) -> Take<Self>
Returns an iterator that yields only the first n
values of this iterator. Read more
fn zip<I>(self, o: I) -> Zip<Self, I::IntoIter> where I: IntoFallibleIterator<Error=Self::Error>
Returns an iterator that yields pairs of this iterator's and another iterator's values. Read more
fn cmp<I>(self, other: I) -> Result<Ordering, Self::Error> where I: IntoFallibleIterator<Item=Self::Item, Error=Self::Error>, Self::Item: Ord
Lexicographically compares the elements of this iterator to that of another. Read more
fn partial_cmp<I>(self, other: I) -> Result<Option<Ordering>, Self::Error> where I: IntoFallibleIterator<Error=Self::Error>, Self::Item: PartialOrd<I::Item>
Lexicographically compares the elements of this iterator to that of another. Read more
fn eq<I>(self, other: I) -> Result<bool, Self::Error> where I: IntoFallibleIterator<Error=Self::Error>, Self::Item: PartialEq<I::Item>
Determines if the elements of this iterator are equal to those of another. Read more
fn ne<I>(self, other: I) -> Result<bool, Self::Error> where I: IntoFallibleIterator<Error=Self::Error>, Self::Item: PartialEq<I::Item>
Determines if the elements of this iterator are not equal to those of another. Read more
fn lt<I>(self, other: I) -> Result<bool, Self::Error> where I: IntoFallibleIterator<Error=Self::Error>, Self::Item: PartialOrd<I::Item>
Determines if the elements of this iterator are lexicographically less than those of another. Read more
fn le<I>(self, other: I) -> Result<bool, Self::Error> where I: IntoFallibleIterator<Error=Self::Error>, Self::Item: PartialOrd<I::Item>
Determines if the elements of this iterator are lexicographically less than or equal to those of another. Read more
fn gt<I>(self, other: I) -> Result<bool, Self::Error> where I: IntoFallibleIterator<Error=Self::Error>, Self::Item: PartialOrd<I::Item>
Determines if the elements of this iterator are lexicographically greater than those of another. Read more
fn ge<I>(self, other: I) -> Result<bool, Self::Error> where I: IntoFallibleIterator<Error=Self::Error>, Self::Item: PartialOrd<I::Item>
Determines if the elements of this iterator are lexicographically greater than or equal to those of another. Read more