Struct addr2line::unit::ResUnit

source ·
pub(crate) struct ResUnit<R: Reader> {
    offset: DebugInfoOffset<R::Offset>,
    dw_unit: Unit<R>,
    pub(crate) lang: Option<DwLang>,
    lines: LazyLines,
    functions: LazyFunctions<R>,
    dwo: LazyCell<Result<Option<Box<DwoUnit<R>>>, Error>>,
}

Fields§

§offset: DebugInfoOffset<R::Offset>§dw_unit: Unit<R>§lang: Option<DwLang>§lines: LazyLines§functions: LazyFunctions<R>§dwo: LazyCell<Result<Option<Box<DwoUnit<R>>>, Error>>

Implementations§

source§

impl<R: Reader> ResUnit<R>

source

pub(crate) fn unit_ref<'a>(&'a self, sections: &'a Dwarf<R>) -> UnitRef<'a, R>

source

pub(crate) fn dwarf_and_unit<'unit, 'ctx: 'unit>( &'unit self, ctx: &'ctx Context<R>, ) -> LookupResult<SimpleLookup<Result<(DebugFile, UnitRef<'unit, R>), Error>, R, impl FnOnce(Option<Arc<Dwarf<R>>>) -> Result<(DebugFile, UnitRef<'unit, R>), Error>>>

Returns the DWARF sections and the unit.

Loads the DWO unit if necessary.

source

pub(crate) fn parse_lines( &self, sections: &Dwarf<R>, ) -> Result<Option<&Lines>, Error>

source

pub(crate) fn parse_functions<'unit, 'ctx: 'unit>( &'unit self, ctx: &'ctx Context<R>, ) -> LookupResult<impl LookupContinuation<Output = Result<&'unit Functions<R>, Error>, Buf = R>>

source

pub(crate) fn parse_inlined_functions<'unit, 'ctx: 'unit>( &'unit self, ctx: &'ctx Context<R>, ) -> LookupResult<impl LookupContinuation<Output = Result<(), Error>, Buf = R> + 'unit>

source

pub(crate) fn find_location( &self, probe: u64, sections: &Dwarf<R>, ) -> Result<Option<Location<'_>>, Error>

source

pub(crate) fn find_location_range( &self, probe_low: u64, probe_high: u64, sections: &Dwarf<R>, ) -> Result<Option<LineLocationRangeIter<'_>>, Error>

source

pub(crate) fn find_function_or_location<'unit, 'ctx: 'unit>( &'unit self, probe: u64, ctx: &'ctx Context<R>, ) -> LookupResult<impl LookupContinuation<Output = Result<(Option<&'unit Function<R>>, Option<Location<'unit>>), Error>, Buf = R>>

Auto Trait Implementations§

§

impl<R> !Freeze for ResUnit<R>

§

impl<R> !RefUnwindSafe for ResUnit<R>

§

impl<R> Send for ResUnit<R>
where <R as Reader>::Offset: Send, R: Send + Sync,

§

impl<R> !Sync for ResUnit<R>

§

impl<R> Unpin for ResUnit<R>
where <R as Reader>::Offset: Unpin, R: Unpin,

§

impl<R> UnwindSafe for ResUnit<R>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.