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.
- Debug
Info Result - The result of a lookup by code_file/code_identifier against a symbol server.
- File
Lookup - A lookup we would like to perform for some file (sym, exe, pdb, dll, …)
- Fill
Symbol Error - An error produced by fill_symbol.
- Locate
Symbols Result - The result of locating symbols, with debug info if it had to be looked up.
- Pending
Symbol Stats - Statistics on pending symbols.
- Simple
Frame - A simple implementation of
FrameSymbolizer
that just holds data. - Simple
Module - A
Module
implementation that holds arbitrary data. - Simple
Symbol Supplier - An implementation of
SymbolSupplier
that loads Breakpad text-format symbols from local disk paths. - String
Symbol Supplier - A SymbolSupplier that maps module names (code_files) to an in-memory string.
- Symbol
File - A parsed .sym file containing debug symbols.
- Symbol
Stats - Statistics on the symbols of a module.
- Symbolizer
- Symbolicate stack frames.
Enums§
- File
Error - File
Kind - A type of file related to a module that you might want downloaded.
- Symbol
Error - Possible results of locating symbols for a module.
Traits§
- Frame
Symbolizer - A trait for setting symbol information on something like a stack frame.
- Frame
Walker - Module
- An executable or shared library loaded in a process.
- Symbol
Supplier - 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).