[−][src]Struct addr2line::Context
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.
Methods
impl Context<EndianRcSlice<RunTimeEndian>>
[src]
pub fn new<'data, 'file, O: Object<'data, 'file>>(
file: &'file O
) -> Result<Self, Error>
[src]
file: &'file O
) -> Result<Self, Error>
Construct a new Context
.
The resulting Context
uses gimli::EndianRcSlice<gimli::RunTimeEndian>
.
This means it is not thread safe, has no lifetime constraints (since it copies
the input data), and works for any endianity.
Performance sensitive applications may want to use Context::from_sections
with a more specialised gimli::Reader
implementation.
impl<R: Reader> Context<R>
[src]
pub fn from_sections(
debug_abbrev: DebugAbbrev<R>,
debug_info: DebugInfo<R>,
debug_line: DebugLine<R>,
debug_ranges: DebugRanges<R>,
debug_rnglists: DebugRngLists<R>,
debug_str: DebugStr<R>
) -> Result<Self, Error>
[src]
debug_abbrev: DebugAbbrev<R>,
debug_info: DebugInfo<R>,
debug_line: DebugLine<R>,
debug_ranges: DebugRanges<R>,
debug_rnglists: DebugRngLists<R>,
debug_str: DebugStr<R>
) -> Result<Self, Error>
Construct a new Context
from DWARF sections.
impl<R> Context<R> where
R: Reader,
[src]
R: Reader,
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_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 = EndianReader<RunTimeEndian, Rc<[u8]>>> !Sync for Context<R>
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,