@dbalster/gdb-plugin 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Daniel Balster
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,85 @@
1
+ # @dbalster/gdb-plugin
2
+
3
+ A [Kilo](https://kilo.ai) / OpenCode TypeScript plugin that provides a full GDB/MI debugging interface via GDB's Machine Interface protocol.
4
+
5
+ ## Features
6
+
7
+ - **30+ debugging tools**: init, load, run, continue, interrupt, step, next, finish, breakpoints, watchpoints, catchpoints, backtrace, locals, evaluate, memory, registers, disassemble, threads, and more
8
+ - **GDB/MI protocol**: Full MI tokenizer/parser with async record handling
9
+ - **State persistence**: Session state saved to `/tmp/kilo-gdb/state.json` across restarts
10
+ - **Process management**: Start, stop, attach, detach, and core dump support
11
+ - **Reverse execution**: record/reverse-step/next/continue/finish
12
+ - **Variable objects**: Create and watch expressions across debugging steps
13
+
14
+ ## Installation
15
+
16
+ ```bash
17
+ npm install -g @dbalster/gdb-plugin
18
+ ```
19
+
20
+ ## Usage in Kilo/OpenCode
21
+
22
+ Copy or symlink `gdb.ts` into your `.kilo/plugins/` directory:
23
+
24
+ ```bash
25
+ mkdir -p ~/project/.kilo/plugins
26
+ cp node_modules/@dbalster/gdb-plugin/dist/gdb.js ~/project/.kilo/plugins/gdb.js
27
+ ```
28
+
29
+ Then reference it in `.kilo/kilo.json`:
30
+
31
+ ```json
32
+ {
33
+ "plugins": ["./plugins/gdb.js"]
34
+ }
35
+ ```
36
+
37
+ ## Tools Provided
38
+
39
+ | Tool | Description |
40
+ |------|-------------|
41
+ | `gdbInit` | Start GDB with a binary executable |
42
+ | `gdbLoad` | Load a new binary/symbol file |
43
+ | `gdbRun` | Run/restart the debugged program |
44
+ | `gdbContinue` | Continue execution |
45
+ | `gdbInterrupt` | Interrupt the running program |
46
+ | `gdbStep` | Step into next source line |
47
+ | `gdbNext` | Step over next source line |
48
+ | `gdbFinish` | Step out of current function |
49
+ | `gdbBreak` | Set a breakpoint |
50
+ | `gdbBreakpointList` | List all breakpoints |
51
+ | `gdbBreakpointDelete` | Delete breakpoint(s) |
52
+ | `gdbBreakpointEnable` / `gdbBreakpointDisable` | Toggle breakpoints |
53
+ | `gdbBreakpointCondition` | Set/clear breakpoint condition |
54
+ | `gdbWatch` | Set a watchpoint |
55
+ | `gdbCatch` | Set a catchpoint |
56
+ | `gdbBacktrace` | Print call stack |
57
+ | `gdbLocals` | Show local variables |
58
+ | `gdbEvaluate` | Evaluate an expression |
59
+ | `gdbSet` | Set a variable/memory value |
60
+ | `gdbDisplay` / `gdbDisplayList` / `gdbDisplayDelete` / `gdbDisplayUpdate` | Variable objects |
61
+ | `gdbThreads` / `gdbSelectThread` | Thread management |
62
+ | `gdbSelectFrame` | Select stack frame |
63
+ | `gdbDisassemble` | Disassemble code |
64
+ | `gdbRegisters` | Show CPU registers |
65
+ | `gdbStatus` | Session status overview |
66
+ | `gdbArgs` / `gdbCwd` / `gdbEnv` | Program setup |
67
+ | `gdbSignal` | Send a signal |
68
+ | `gdbAttach` / `gdbDetach` | Process attach/detach |
69
+ | `gdbCore` | Generate core dump |
70
+ | `gdbSource` | Source a GDB script |
71
+ | `gdbPstack` | Stack traces for all threads |
72
+ | `gdbRecord` / `gdbReverse` | Reverse execution |
73
+ | `gdbFind` / `gdbMem` | Memory search and dump |
74
+ | `gdbJump` / `gdbReturn` | Execution control flow |
75
+ | `gdbExit` | Terminate GDB session |
76
+ | `gdbRaw` / `gdbInfo` / `gdbExec` | Raw/CLI command access |
77
+
78
+ ## Requirements
79
+
80
+ - [GDB](https://www.gnu.org/software/gdb/) installed on the system
81
+ - A compiled binary with debug symbols (`-g` flag)
82
+
83
+ ## License
84
+
85
+ MIT
package/dist/gdb.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import { type Plugin, type PluginInput } from "@kilocode/plugin";
2
+ export default function gdbPlugin(input: PluginInput): ReturnType<Plugin>;
3
+ //# sourceMappingURL=gdb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gdb.d.ts","sourceRoot":"","sources":["../gdb.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAQ,KAAK,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAm1BvE,wBAA8B,SAAS,CAAC,KAAK,EAAE,WAAW,GAAG,UAAU,CAAC,MAAM,CAAC,CAi6B9E"}