pub(crate) struct ResUnits<R: Reader> {
ranges: Box<[UnitRange]>,
units: Box<[ResUnit<R>]>,
}
Fields§
§ranges: Box<[UnitRange]>
§units: Box<[ResUnit<R>]>
Implementations§
source§impl<R: Reader> ResUnits<R>
impl<R: Reader> ResUnits<R>
pub(crate) fn parse(sections: &Dwarf<R>) -> Result<Self, Error>
pub(crate) fn iter(&self) -> impl Iterator<Item = &ResUnit<R>>
pub(crate) fn find_offset( &self, offset: DebugInfoOffset<R::Offset>, ) -> Result<&Unit<R>, Error>
sourcepub(crate) fn find(&self, probe: u64) -> impl Iterator<Item = &ResUnit<R>>
pub(crate) fn find(&self, probe: u64) -> impl Iterator<Item = &ResUnit<R>>
Finds the CUs for the function address given.
There might be multiple CUs whose range contains this address. Weak symbols have shown up in the wild which cause this to happen but otherwise this can happen if the CU has non-contiguous functions but only reports a single range.
Consequently we return an iterator for all CUs which may contain the address, and the caller must check if there is actually a function or location in the CU for that address.
sourcepub(crate) fn find_range(
&self,
probe_low: u64,
probe_high: u64,
) -> impl Iterator<Item = (&ResUnit<R>, &Range)>
pub(crate) fn find_range( &self, probe_low: u64, probe_high: u64, ) -> impl Iterator<Item = (&ResUnit<R>, &Range)>
Finds the CUs covering the range of addresses given.
The range is [low, high) (ie, the upper bound is exclusive). This can return multiple ranges for the same unit.
pub(crate) fn find_location_range<'a>( &'a self, probe_low: u64, probe_high: u64, sections: &'a Dwarf<R>, ) -> Result<LocationRangeIter<'a, R>, Error>
Auto Trait Implementations§
impl<R> Freeze for ResUnits<R>
impl<R> !RefUnwindSafe for ResUnits<R>
impl<R> Send for ResUnits<R>
impl<R> !Sync for ResUnits<R>
impl<R> Unpin for ResUnits<R>
impl<R> UnwindSafe for ResUnits<R>
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