gdbstub 0.6: An ergonomic, #![no_std] implementation of the GDB Remote Serial Protocol in Rust - now with async support!
gdbstub is an ergonomic and easy-to-integrate implementation of the GDB Remote Serial Protocol in Rust, with full #![no_std] support.
By implementing just a few basic methods from the gdbstub::Target trait, you can get a rich GDB debugging session up and running in your emulator / hypervisor / debugger / embedded project in no time!
After over a half-year of development, gdbstub 0.6 has finally been released!
This massive update delivers a slew of new protocol extensions, internal improvements, and key API improvements. Some highlights include:
- A new non-blocking
GdbStubStateMachineAPI, enablinggdbstubto integrate nicely with async event loops!- Moreover, on
no_stdplatforms, this new API enablesgdbstubto be driven directly via breakpoint/serial interrupt handlers! - This API is already being used in several Rust kernel projects, such as
vmware-labs/node-replicated-kernelandbetrusted-io/xous-coreto enable bare-metal, in-kernel debugging.
- Moreover, on
gdbstubis now entirely panic free in release builds!- \* subject to
rustc's compiler optimizations - This was a pretty painstaking effort, but the end result is a substantial reduction in binary size on
no_stdplatforms.
- \* subject to
- Tons of new and exciting protocol extensions, including but not limited to:
- Support for remote file I/O (reading/writing files to the debug target)
- Fetching remote memory maps
- Catching + reporting syscall entry/exit conditions
- ...and many more!
- A new license:
gdbtsubis licensed under MIT OR Apache-2.0
See the changelog for a comprehensive rundown of all the new features.
While this release does come with quite a few breaking changes, the core IDET-based Target API has remained much the same, which should make porting code over from 0.5.x to 0.6 pretty mechanical. See the transition_guide.md for guidance on upgrading from 0.5.x to 0.6.
And as always, a huge shoutout to the folks who contributed PRs, Issues, and ideas to gdbstub - this release wouldn't have been possible without you! Special shoutouts to gz and xobs for helping me test and iterate on the new bare-metal state machine API, and bet4it for pointing out and implementing many useful API improvements and internal refactors.
Cheers!