Comments (5)
Sure, I'd be glad to see this implemented. Would it work for stack frame navigation (up, down) too? These also require jumps in the source code window without actually changing the debugger state.
from nvim-gdb.
I'm going to implement a way to execute commands via the side channel (see gdb.customCommand
in the branch eval).
User autocommands can be used to notify about the debugger backend state.
from nvim-gdb.
@lanza, could you please check this out?
I think the idea can be taken even further. The plugin could provide a function to open a window that would "watch" an expression.
from nvim-gdb.
So this is a good implementation and idea, but it's not the same as I was talking about in this issue.
The patch you just landed adds the ability to call HandleCommand
over a socket interface. So it lets you hide NvimGDB's HandleCommand usage. HandleCommand
is the exact same function that is called when you submit something on lldb's command line interface.
So from here on out you should be able to map, for example, GdbBreakpointToggle
to lua gdb.customCommand('rb file:line')
instead of simply sending it to the terminal buffer in neovim. This could let you hide nvim-gdb's implementation from the user.
This issue was about a different topic, though. lldb_commands.py
currently listens to the lua client for requests info-breakpoints
and handle-command
with the server
function. But you can also setup another thread to listen to events from lldb itself and then forward that information to the lua client. This way nvim-gdb can be told when lldb stops at a breakpoint instead of scraping the stdout of the terminal buffer for the frame info.
A clear example of this API usage is at https://reviews.llvm.org/source/lldb/browse/lldb/trunk/examples/python/performance.py. You can walk through this script in PDB to observe what it does. I also just pushed a WIP commit (more of a demo of the idea) to lanza@c22f74f.
from nvim-gdb.
Right, I ignored the first part intentionally. Currently, the debugger state is (tried to be) recognized by parsing the interpreter output. That's a little bit unreliable, but it works quite well for both GDB and PDB. I'd like to keep the implementation unified. But probably, I should agree with you that since LLDB offers a good API, we could harness it through Python without even parsing the output.
from nvim-gdb.
Related Issues (20)
- Error using lldb HOT 7
- Is it possible to disable default keybindings? HOT 1
- Implement checkhealth
- Feature Request: Make vim the owner of breakpoints and not the debugger HOT 3
- Error detected while processing TabLeave Autocommands for "*" on tabnew: GdbStartPDB HOT 7
- [Solved] Unknown sign: GdbBreakpoint0 after merging d7504a52e3f5f1b6d7f62a006646681bde65a310 HOT 2
- 'GdbStart...' error if delete buffer at event 'NvimGdbCleanup' HOT 2
- mingw support? HOT 6
- Port the test suite to be based on Lua
- Port launch scripts to Lua
- Port PTY proxy to Lua
- Support PerlDB HOT 4
- gdb attach mode HOT 1
- My environment breaks the plugin HOT 2
- error calling thread_get_state for gp registers for thread 0x1d3 HOT 9
- nvim_config_override works with vimscript functions but not lua functions HOT 1
- DWARF2 Queue Guard Internal Error on run HOT 6
- showing variables when debugging with bashdb HOT 3
- [Question] unable to run lldb on Mac HOT 2
- GDB crashes with Fatal signal: Segmentation fault
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvim-gdb.