pub struct Resolver { /* private fields */ }Expand description
Source line resolver for stack frames. Handles Breakpad symbol files and searches them for instructions.
To use this resolver, obtain a list of referenced modules from a
ProcessState and load all of them into the resolver. Once symbols have
been loaded for a CodeModule, the resolver can fill frames with source
line information.
See ResolvedStackFrame for all available information.
Implementations§
Source§impl Resolver
impl Resolver
Sourcepub fn from_file<P: AsRef<Path>>(file_path: P) -> Result<Resolver>
pub fn from_file<P: AsRef<Path>>(file_path: P) -> Result<Resolver>
Creates a new Resolver instance from a Breakpad symbol file in the
file system
Sourcepub fn from_buffer(buffer: &[u8]) -> Result<Resolver>
pub fn from_buffer(buffer: &[u8]) -> Result<Resolver>
Creates a new Resolver instance from a buffer containing Breakpad symbols
Sourcepub fn corrupt(&self) -> bool
pub fn corrupt(&self) -> bool
Returns whether this Resolver is corrupt or it can be used to
resolve source line locations of StackFrames.
Sourcepub fn resolve_frame(&self, frame: &StackFrame) -> ResolvedStackFrame
pub fn resolve_frame(&self, frame: &StackFrame) -> ResolvedStackFrame
Tries to locate the frame’s instruction in the loaded code modules. Returns a resolved stack frame instance. If no symbols can be found for the frame, a clone of the input is returned.