lldb.nvim
lldb.nvim copied to clipboard
Define debugger-generic event-based interface
Separate out LLDB-specific logic and define a debugger-generic event-based interface. This will enable adding support for other debuggers using output parsing (e.g. GDB support can be added by borrowing parser code from Conque-GDB).
- [ ] Separate out the event loop into LLDB event loop and Controller event loop
- [ ] Define a set of debugger events accepted by Controller (update a debug-buffer contents, (un)highlight BP or PC lines, (un)mark a breakpoint, etc.)
- [ ] Define a set of user events accepted by *Controller" (requesting to change mode, execute a command, create a breakpoint, send an interrupt, exit, etc.)
- [ ] Define a generic interruption interface that should be implemented by a debugger event loop class, using which Controller can request the debugger to perform certain actions (based on user request).
(The plugin name along with :LL
-prefix of commands may have to be changed, after adding support for more debuggers.)
+1
Support for GDB can be implemented using https://github.com/cs01/pygdbmi without much pain. A good strategy might be to fork this and replace LLDB with GDB, then figure out a generic API that can play well with both, and finally combining the two.
While at it, it might be good to keep in mind Vim channels too (a bit). #34
(These are ideas that I'm unlikely to implement myself.)