Expand description
§Rudy DB
A user-friendly library for interacting with debugging information of Rust compiled artifacts using DWARF.
This library provides lazy evaluation and incremental recomputation via salsa for use in long-running processes like debuggers.
§Basic Usage
use rudy_db::{DebugDb, DebugInfo};
use anyhow::Result;
fn main() -> Result<()> {
// Create a new database
let mut db = DebugDb::new();
// Create a DebugInfo instance for your binary
let debug_info = DebugInfo::new(&db, "path/to/binary")?;
// Resolve an address to source location
if let Ok(Some(location)) = debug_info.address_to_location(0x12345) {
println!("Address 0x12345 is at {}:{}", location.file, location.line);
}
Ok(())
}
Re-exports§
pub use rudy_dwarf;
pub use rudy_types;
Structs§
- DebugDb
- Debug
Info - Main interface for accessing debug information from binary files.
- Discovered
Function - A discovered function with its metadata
- Discovered
Method - A discovered method with its metadata
- Function
Parameter - A function parameter with its type information
- Resolved
Address - A resolved memory address from a source location.
- Resolved
Location - Source location information resolved from a memory address.
- Synthetic
Method - A synthetic method that can be evaluated without execution
- Type
- Type information for a variable or field.
- Typed
Pointer - A pointer to an entry in memory, with its type definition
- Variable
- A variable with its type and optionally its runtime value.
- Variable
Info - Variable metadata without resolved value - used for expression evaluation.
Enums§
- Self
Type - Type of self parameter in a method
- Value
- A value read from memory, supporting scalars, arrays, and structs.
Traits§
- Data
Resolver - Trait for resolving data from memory during debugging.
Functions§
- evaluate_
synthetic_ method - Evaluate a synthetic method call
- get_
synthetic_ methods - Get all synthetic methods available for a given type