8 releases (4 breaking)
| 0.4.2 | Aug 9, 2025 |
|---|---|
| 0.4.1 | Jul 26, 2025 |
| 0.3.1 | Jul 7, 2025 |
| 0.2.0 | Jul 4, 2025 |
| 0.0.1 | Jul 1, 2025 |
#643 in Database interfaces
29 downloads per month
Used in 2 crates
(via rudy-db)
700KB
8K
SLoC
DWARF debug information parsing and querying
This crate provides functionality for parsing DWARF debug information from object files and querying it through a salsa database.
Rudy
A Rust library for interacting with debugging information of compiled artifacts using DWARF format. Provides lazy evaluation and incremental computation for long-running processes like debuggers.
⚠️ Experimental Status: This library is in early development (0.0.x). The API is unstable and subject to breaking changes.
[!IMPORTANT] See the announcement post for more on the rationale/design behind Rudy.
LLDB Extension
We also provide an example rudy-lldb extension that brings the capabilities of rudy-db to the lldb debugger.
Here's a short demo:
Installation (rudy-lldb)
Quick Install:
cargo install rudy-lldb
rudy-lldb-server install
This will download the LLDB client script and configure your ~/.lldbinit automatically.
Manual Install:
- Install
rudy-lldbfrom source:cargo install rudy-lldb - Download the client:
curl https://raw.githubusercontent.com/samscott89/rudy/main/rudy-lldb/python/rudy_lldb.py -o ~/.lldb/rudy_lldb.py - Add to
~/.lldbinit:echo "command script import ~/.lldb/rudy_lldb.py" >> ~/.lldbinit
Server Management: The rudy-lldb server will automatically start when you run your first rd command in LLDB. You can also manage it manually:
rudy-lldb-server start- Start the serverrudy-lldb-server stop- Stop the server- Set
RUDY_AUTOSTART=0to disable automatic server startup
Architecture
- Low-level DWARF parsing (
rudy-dwarf) - Parser combinators and visitor patterns abstracting gimli - High-level API (
rudy-db) -DebugInfowrapper with salsa-based incremental caching - LLDB integration (
rudy-lldb) - RPC server for interactive debugging
Features
- Lazy evaluation using salsa for incremental computation
- Low-level DWARF parser combinators and visitor structs
- Higher-level
DebugInfowrapper for common debugging operations - Cross-platform support (x86_64, aarch64 on macOS, Linux)
Basic Usage (rudy-db)
Here's a simple example of loading a binary and resolving type information from a memory address:
use rudy_db::DebugDb;
use anyhow::Result;
fn main() -> Result<()> {
// Create a new database
let mut db = DebugDb::new();
// Get debug information for a binary
let debug_info = DebugInfo::new(&db, "/path/to/binary")?;
// Find a function by name
let function = db.find_function_by_name("my_function")?;
// get all params:
for param in &function.params {
println!("Param: {:?} with type: {}", param.name, param.ty.display_name());
}
Ok(())
}
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
Note: This is an experimental project. Please report any issues or feature requests on our GitHub issue tracker.
Dependencies
~12MB
~213K SLoC