Struct minidump_processor::Symbolizer [−][src]
pub struct Symbolizer { /* fields omitted */ }Expand description
Symbolicate stack frames.
A Symbolizer manages loading symbols and looking up symbols in them
including caching so that symbols for a given module are only loaded once.
Call Symbolizer::new to instantiate a Symbolizer. A Symbolizer
requires a SymbolSupplier to locate symbols. If you have
symbols on disk in the customary directory layout, a
SimpleSymbolSupplier will work.
Use get_symbol_at_address or fill_symbol to
do symbol lookup.
Implementations
Create a Symbolizer that uses supplier to locate symbols.
Helper method for non-minidump-using callers.
Pass debug_file and debug_id describing a specific module,
and address, a module-relative address, and get back
a symbol in that module that covers that address, or None.
See the module-level documentation for an example.
pub fn fill_symbol(
&self,
module: &dyn Module,
frame: &mut dyn FrameSymbolizer
) -> Result<(), FillSymbolError>
pub fn fill_symbol(
&self,
module: &dyn Module,
frame: &mut dyn FrameSymbolizer
) -> Result<(), FillSymbolError>
Fill symbol information in frame using the instruction address
from frame, and the module information from module. If you’re not
using a minidump module, you can use SimpleModule and
SimpleFrame.
An Error indicates that no symbols could be found for the relevant module.
Examples
use breakpad_symbols::{SimpleSymbolSupplier,Symbolizer,SimpleFrame,SimpleModule};
use std::path::PathBuf;
let paths = vec!(PathBuf::from("../testdata/symbols/"));
let supplier = SimpleSymbolSupplier::new(paths);
let symbolizer = Symbolizer::new(supplier);
let m = SimpleModule::new("test_app.pdb", "5A9832E5287241C1838ED98914E9B7FF1");
let mut f = SimpleFrame::with_instruction(0x1010);
let _ = symbolizer.fill_symbol(&m, &mut f);
assert_eq!(f.function.unwrap(), "vswprintf");
assert_eq!(f.source_file.unwrap(), r"c:\program files\microsoft visual studio 8\vc\include\swprintf.inl");
assert_eq!(f.source_line.unwrap(), 51);Collect various statistics on the symbols.
Keys are the file name of the module (code_file’s file name).
Tries to use CFI to walk the stack frame of the FrameWalker
using the symbols of the given Module. Output will be written
using the FrameWalker’s set_caller_* APIs.
Trait Implementations
fn fill_symbol(
&self,
module: &dyn Module,
frame: &mut dyn FrameSymbolizer
) -> Result<(), FillSymbolError>
Auto Trait Implementations
impl !RefUnwindSafe for Symbolizer
impl !Send for Symbolizer
impl !Sync for Symbolizer
impl Unpin for Symbolizer
impl !UnwindSafe for Symbolizer
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more