Crate breakpad_symbols

source ·
Expand description

A library for working with Google Breakpad’s text-format symbol files.

See the walker module for documentation on CFI evaluation.

The highest-level API provided by this crate is to use the Symbolizer struct.

Examples

use breakpad_symbols::{SimpleSymbolSupplier, Symbolizer, SimpleFrame, SimpleModule};
use debugid::DebugId;
use std::path::PathBuf;
use std::str::FromStr;

#[tokio::main]
async fn main() {
    let paths = vec!(PathBuf::from("../testdata/symbols/"));
    let supplier = SimpleSymbolSupplier::new(paths);
    let symbolizer = Symbolizer::new(supplier);

    // Simple function name lookup with debug file, debug id, address.
    let debug_id = DebugId::from_str("5A9832E5287241C1838ED98914E9B7FF1").unwrap();
    assert_eq!(symbolizer.get_symbol_at_address("test_app.pdb", debug_id, 0x1010)
        .await
        .unwrap(),
        "vswprintf");
}

Modules

This module implements support for breakpad’s text-based STACK CFI and STACK WIN unwinding instructions. This isn’t something you need to actually use directly, it’s just public so these docs will get a nice pretty rendering.

Structs

DWARF CFI rules for recovering registers at a specific address.
A lookup we would like to perform for some file (sym, exe, pdb, dll, …)
An error produced by fill_symbol.
Statistics on pending symbols.
A simple implementation of FrameSymbolizer that just holds data.
A Module implementation that holds arbitrary data.
An implementation of SymbolSupplier that loads Breakpad text-format symbols from local disk paths.
A SymbolSupplier that maps module names (code_files) to an in-memory string.
A parsed .sym file containing debug symbols.
Statistics on the symbols of a module.

Enums

A type of file related to a module that you might want downloaded.
Possible results of locating symbols for a module.

Traits

A trait for setting symbol information on something like a stack frame.
An executable or shared library loaded in a process.
A trait for things that can locate symbols for a given module.

Functions

Returns a lookup for this module’s binary (exe, dll, so, dylib, …)
Get a relative symbol path at which to locate symbols for module.
Returns a lookup for this module’s extra debuginfo (pdb)
Mangles a lookup to mozilla’s format where the last char is replaced by an underscore (and the file is wrapped in a CAB, but dump_syms handles that transparently).