rusty-dbg is a command-line debugger for Linux systems, written entirely in Rust. It provides basic functionality like stepping through instructions, setting breakpoints, inspecting registers and memory, disassembling instructions, and viewing DWARF-based debug info.
Due to the current architecture being tightly coupled to a CLI-only interface, further development on this repository has been paused.
| Feature | Command | Description |
|---|---|---|
| Continue Execution | cont / c |
Resume process execution |
| Step Instruction | step / s |
Single-step the next instruction |
| Step Over | next / n |
Step over function calls |
| Set Breakpoint | bp / b |
Set breakpoint at address or function |
| Remove Breakpoint | rm-bp / rmb |
Remove a breakpoint by address |
| List Breakpoints | show-bp |
Show all breakpoints |
| Inspect Registers | regs |
View all CPU register values |
| Set Register Value | sr <reg> <val> |
Set a register’s value |
| Get Register Value | gr <reg> |
Print value of a register |
| Read Memory | dump <addr> [n] |
Dump n bytes at address addr |
| Patch Memory | patch <addr> <v> |
Write a value into memory at given address |
| Disassemble Code | disas |
Disassemble instructions at current RIP |
| Backtrace | bt / backtrace |
Show the current stack trace |
| Sections Info | sections / sec |
Print section headers from ELF |
| Function Offset | offset |
Show offset from base address |
| Function Listing | functions |
Print list of known functions (ELF symbols) |
| Exit Debugger | exit |
Quit the debugger |
- Linux (x86_64)
- Rust (stable)
ptracepermission (usually root or viacap_sys_ptrace)
cargo build --release
sudo ./target/release/rusty-dbg <pid|path-to-binary>Or just run from source:
sudo cargo run -- <pid|binary>This is a work-in-progress learning project and lacks many advanced features:
- No thread support
- Minimal signal handling
- No shared library breakpoint persistence
- Only works on x86_64 Linux ELF binaries
If you have ideas or critiques, especially around architecture or organization I'd love to hear your feedback.