Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to implement continue #63

Open
nomtats opened this issue Sep 27, 2020 · 1 comment
Open

How to implement continue #63

nomtats opened this issue Sep 27, 2020 · 1 comment

Comments

@nomtats
Copy link

nomtats commented Sep 27, 2020

Hi @luser,

I'm working on a similar project for JS:
https://github.com/nomtats/gdbserver-stub
https://medium.com/@tatsuo.nomura/implement-gdb-remote-debug-protocol-stub-from-scratch-6-1ac945e57399

I implemented continuation handling by allowing the handler to return "OK" and keep executing.
The handler emits an "stopped" even at a breakpoint or when received a Ctrl-C.

In rust-gdb-remote-protocol, IIUC, handle_continue needs to return a stop reason, which might not be possible before the connection goes timeout in NoAck mode because GDB/LLDB expects a immediate reply from the stub.
I can cheat by replying a stop to GDB while continue executing, but I wonder if there is a better way to properly do this.

@luser
Copy link
Owner

luser commented Sep 28, 2020

Enough of this has fallen out of my head that I'm not sure I can usefully comment here. @tromey (an actual GDB developer) had some thoughts on this, see #26 for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants