Struct addr2line::Context [−][src]
The state necessary to perform address to line translation.
Constructing a Context
is somewhat costly, so users should aim to reuse Context
s
when performing lookups for many addresses in the same executable.
Implementations
impl<R: Reader> Context<R>
[src]
pub fn from_sections(
debug_abbrev: DebugAbbrev<R>,
debug_addr: DebugAddr<R>,
debug_info: DebugInfo<R>,
debug_line: DebugLine<R>,
debug_line_str: DebugLineStr<R>,
debug_ranges: DebugRanges<R>,
debug_rnglists: DebugRngLists<R>,
debug_str: DebugStr<R>,
debug_str_offsets: DebugStrOffsets<R>,
default_section: R
) -> Result<Self, Error>
[src]
debug_abbrev: DebugAbbrev<R>,
debug_addr: DebugAddr<R>,
debug_info: DebugInfo<R>,
debug_line: DebugLine<R>,
debug_line_str: DebugLineStr<R>,
debug_ranges: DebugRanges<R>,
debug_rnglists: DebugRngLists<R>,
debug_str: DebugStr<R>,
debug_str_offsets: DebugStrOffsets<R>,
default_section: R
) -> Result<Self, Error>
Construct a new Context
from DWARF sections.
pub fn from_dwarf(sections: Dwarf<R>) -> Result<Self, Error>
[src]
Construct a new Context
from an existing gimli::Dwarf
object.
pub fn dwarf(&self) -> &Dwarf<R>
[src]
The dwarf sections associated with this Context
.
pub fn find_dwarf_unit(&self, probe: u64) -> Option<&Unit<R>>
[src]
Find the DWARF unit corresponding to the given virtual memory address.
pub fn find_location(&self, probe: u64) -> Result<Option<Location<'_>>, Error>
[src]
Find the source file and line corresponding to the given virtual memory address.
pub fn find_location_range(
&self,
probe_low: u64,
probe_high: u64
) -> Result<LocationRangeIter<'_, R>, Error>
[src]
&self,
probe_low: u64,
probe_high: u64
) -> Result<LocationRangeIter<'_, R>, Error>
Return source file and lines for a range of addresses. For each location it also returns the address and size of the range of the underlying instructions.
pub fn find_frames(&self, probe: u64) -> Result<FrameIter<'_, R>, Error>
[src]
Return an iterator for the function frames corresponding to the given virtual memory address.
If the probe address is not for an inline function then only one frame is returned.
If the probe address is for an inline function then the first frame corresponds to the innermost inline function. Subsequent frames contain the caller and call location, until an non-inline caller is reached.
Auto Trait Implementations
impl<R> Send for Context<R> where
R: Send,
<R as Reader>::Offset: Send,
R: Send,
<R as Reader>::Offset: Send,
impl<R> !Sync for Context<R>
impl<R> Unpin for Context<R> where
R: Unpin,
<R as Reader>::Offset: Unpin,
R: Unpin,
<R as Reader>::Offset: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,