Struct addr2line::BufferMapping
[−]
[src]
pub struct BufferMapping<'input>(_);
A BufferMapping
locates and maintains the state necessary to perform address to line
translation for a given buffer containing the executable file data.
This mapping requires the caller to read the data from the file and ensure the lifetime of the buffer encompasses the lifetime of the mapping.
Constructing a BufferMapping
is somewhat costly, so users should aim to re-use created
BufferMapping
s when performing lookups for many addresses over the same executable.
Methods
impl<'input> BufferMapping<'input>
[src]
fn new(bytes: &'input [u8]) -> Result<BufferMapping<'input>>
Construct a new BufferMapping
with the default Options
.
fn locate(
&mut self,
addr: u64
) -> Result<Option<(PathBuf, Option<u64>, Option<Cow<'input, str>>)>>
&mut self,
addr: u64
) -> Result<Option<(PathBuf, Option<u64>, Option<Cow<'input, str>>)>>
Locate the source file and line corresponding to the given virtual memory address.
If the BufferMapping
was constructed with with_functions
, information about the
containing function may also be returned when available.