pi-gdb
Pi extension that lets agents use GDB, with smart timeouts, robust error handling, clear formatting, and a tiny token footprint.
Package details
Install pi-gdb from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-gdb- Package
pi-gdb- Version
0.1.0- Published
- Aug 13, 2026
- Downloads
- 164/mo · 16/wk
- Author
- unneon
- License
- MIT
- Types
- extension
- Size
- 13.9 KB
- Dependencies
- 0 dependencies · 0 peers
Pi manifest JSON
{
"extensions": [
"index.ts"
],
"image": "https://unneon.dev/images/pi-gdb.png"
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-gdb
A Pi extension wrapping GDB in an agent-friendly interface.
Why? Trying to automate programming can run into issues, but automated debugging
seems like a much clearer win. To install it, just rust pi install pi-gdb. So,
if you're writing anything compiling to native code (C, C++, Rust, Zig, ...),
here's a bunch of reasons to try it:
- Works well with local models. Just like Pi itself, this extension engineered with a minimal token footprint in mind. Even Qwen 3.6 27B at IQ3_XXS managed to root cause some real bugs I ran into while working on my toy kernel, and you can run that with MTP on any 16GB GPU. If you have an 8 GB GPU, Qwen 3.6 35B A3B Q4_K_M with non-shared experts offloaded to the CPU should be nearly as good.
- Robust error handling. This extension parses GDB output, uses short timeouts between individual commands, aborts the current batch of commands in case one of them returns an error, handles unexpected process termination correctly, and adds information about this to responses, which helps the LLM stay on the right track. It'd be also possible to add automated command fixing or smart symbol searches in the future.
- Unopinionated. The extension includes just a single
gdbtool with a minimal description. I recommend adding some project-local skills describing how to attach GDB to the test suite, where to find core dumps, or recond-and-replay recordings. With local models it can help to instruct them to start debugging straight away rather than read files, and restart gdb and set an earlier breakpoint if they get stuck, but YMMV. Find out what works well for your project, and enjoy a little less time spent staring at register dumps and assembly listings.
