6 releases (3 breaking)
Uses new Rust 2024
| 0.4.1 | Aug 9, 2025 |
|---|---|
| 0.4.0 | Jul 7, 2025 |
| 0.3.0 | Jul 4, 2025 |
| 0.2.1 | Jul 1, 2025 |
| 0.1.0 | Jun 27, 2025 |
#69 in Parser tooling
487 downloads per month
Used in 3 crates
105KB
2.5K
SLoC
Shared parsing utilities for types and expressions
This module provides common parsing functionality using the unsynn crate
for both type parsing (used in DWARF name resolution) and expression parsing
(used in LLDB integration).
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
~15MB
~178K SLoC