July 9, 2025 (1mo ago):
rudyis Rust-specific debuginfo tooling. By default,cargo buildinvokesrustcwith-gand outputs debug info with the binary. On MacOS and Linux,rustcemits DWARF debugging info.rudyconsists ofrudy-dwarffor directly interacting with DWARF info andrudy-dbfor a higher-level interface. Its two main goals are to improve Rust debugging withlldbviarudy-lldband build foundational tooling.
Rudy LLDB:
rudy-lldbis a small application usingrudy-dbto provide an extension forlldb. It works by adding the Python client to~/.lldbinit, connecting to a locally-running server over TCP, and usingrudy-dbto query and forward information.- It extends
lldbwith Rust-specific functionality, understands Rust types and their memory layouts, and differentiates between functions, methods, and trait implementations.
Rudy Dwarf:
rudy-dwarfis a "medium-level" library for interacting with DWARF info, sitting abovegimli. It provides indexes for fast lookups, parser combinators for extracting data, and a visitor trait.- The parser is based on the
Parsertrait, which takes asalsadatabase and aDie(an opaque wrapper around an offset) and parses the DWARF info. Parser combinators likeallare used to combine multiple parsers. - For example, complex Rust types like enums can be parsed using reusable components, and parser combinators make it easy to build custom functionality.
Using Salsa:
- The project initially aimed to build a Rust-specific debugger but was split into
rudy.salsais used for incremental computation and caching inrudy-dwarfandrudy-db. - On MacOS,
rudy-dbcomputes indexes quickly for small projects (20-30ms) and larger projects (1-2s). Individual operations are fast after indexing (around 1ms for small, 10ms for large). - There are improvements to be made, especially on Linux where indexing the entire binary upfront is expensive. A follow-up post is planned to discuss the use of
salsain more detail.
- The project initially aimed to build a Rust-specific debugger but was split into
Digression: Why do we need better debugging tooling for Rust?:
- The author has used Rust for over 10 years and only used interactive debuggers for stack overflows. Print debugging can be a trap, and it would be helpful to have an interactive debugger to query the system state.
rudyaims to makelldbdebugging a viable option and provide foundational tooling for the next generation of debug tooling.
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用。你还可以使用@来通知其他用户。