pub struct Symbolizer { /* private fields */ }

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.

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 std::str::FromStr;
use debugid::DebugId;
use breakpad_symbols::{SimpleSymbolSupplier,Symbolizer,SimpleFrame,SimpleModule};

#[tokio::main]
async fn main() {
    use std::path::PathBuf;
    let paths = vec!(PathBuf::from("../testdata/symbols/"));
    let supplier = SimpleSymbolSupplier::new(paths);
    let symbolizer = Symbolizer::new(supplier);
    let debug_id = DebugId::from_str("5A9832E5287241C1838ED98914E9B7FF1").unwrap();
    let m = SimpleModule::new("test_app.pdb", debug_id);
    let mut f = SimpleFrame::with_instruction(0x1010);
    let _ = symbolizer.fill_symbol(&m, &mut f).await;
    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.

Gets the path to a file for a given module (or an Error).

This returns a CachedOperation which is guaranteed to already be resolved (lifetime stuff).

Trait Implementations

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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