Crate rudy_db

Source
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
DebugInfo
Main interface for accessing debug information from binary files.
DiscoveredFunction
A discovered function with its metadata
DiscoveredMethod
A discovered method with its metadata
FunctionParameter
A function parameter with its type information
ResolvedAddress
A resolved memory address from a source location.
ResolvedLocation
Source location information resolved from a memory address.
SyntheticMethod
A synthetic method that can be evaluated without execution
Type
Type information for a variable or field.
TypedPointer
A pointer to an entry in memory, with its type definition
Variable
A variable with its type and optionally its runtime value.
VariableInfo
Variable metadata without resolved value - used for expression evaluation.

Enums§

SelfType
Type of self parameter in a method
Value
A value read from memory, supporting scalars, arrays, and structs.

Traits§

DataResolver
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