Struct addr2line::Mapping
[−]
[src]
pub struct Mapping { /* fields omitted */ }
A Mapping
locates and maintains the state necessary to perform address to line translation.
Constructing a Mapping
is somewhat costly, so users should aim to re-use created Mapping
s
when performing lookups for many addresses over the same executable.
Methods
impl Mapping
[src]
fn new<P>(file_path: P) -> Result<Mapping> where
P: AsRef<Path>,
P: AsRef<Path>,
Construct a new Mapping
with the default Options
.
The target file will be memmap'd, and then gimli
is used to parse out the necessary debug
symbols, without copying data when possible.
fn locate(
&self,
addr: u64
) -> Result<Option<(PathBuf, Option<u64>, Option<Cow<str>>)>>
&self,
addr: u64
) -> Result<Option<(PathBuf, Option<u64>, Option<Cow<str>>)>>
Locate the source file and line corresponding to the given virtual memory address.
If the Mapping
was constructed with with_functions
, information about the containing
function may also be returned when available.