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§

walker
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§

CfiRules
DWARF CFI rules for recovering registers at a specific address.
DebugInfoResult
The result of a lookup by code_file/code_identifier against a symbol server.
FileLookup
A lookup we would like to perform for some file (sym, exe, pdb, dll, …)
FillSymbolError
An error produced by fill_symbol.
LocateSymbolsResult
The result of locating symbols, with debug info if it had to be looked up.
PendingSymbolStats
Statistics on pending symbols.
SimpleFrame
A simple implementation of FrameSymbolizer that just holds data.
SimpleModule
A Module implementation that holds arbitrary data.
SimpleSymbolSupplier
An implementation of SymbolSupplier that loads Breakpad text-format symbols from local disk paths.
StringSymbolSupplier
A SymbolSupplier that maps module names (code_files) to an in-memory string.
SymbolFile
A parsed .sym file containing debug symbols.
SymbolStats
Statistics on the symbols of a module.
Symbolizer
Symbolicate stack frames.

Enums§

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

Traits§

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

Functions§

basename
binary_lookup
Returns a lookup for this module’s binary (exe, dll, so, dylib, …)
breakpad_sym_lookup
Get a relative symbol path at which to locate symbols for module.
code_info_breakpad_sym_lookup
Get a relative symbol path at which to locate symbols for module using the code file and code identifier. This is helpful for Microsoft modules where we don’t have a valid debug filename and debug id to retrieve the symbol file with and the symbol server supports looking up debug filename and debug id using the code file and code id.
extra_debuginfo_lookup
Returns a lookup for this module’s extra debuginfo (pdb)
lookup
moz_lookup
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).