-
Notifications
You must be signed in to change notification settings - Fork 42
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
Handling the ContinuedEvent #335
Handling the ContinuedEvent #335
Conversation
@asimgunes this looks promising - it over sends ContinuedEvent, which is not strictly a bug, but may be undesired. From the DAP docs:
See here that VSCode already sends a simulated continued event on operations like next. We could avoid sending these unnecessary ContinuedEvents to avoid unnecessary updates to the UI and related code. The flip-side of this issue is that we aren't testing that we are sending continued events when no previous request implies one. To achieve this, instead of doing |
|
||
// if gdbNonStop=false stop the thread for next iteration | ||
if (!gdbNonStop) { | ||
await dc.pauseRequest({ threadId: thread.id }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't work on Windows in non-async case. see
cdt-gdb-adapter/src/integration-tests/breakpoints.spec.ts
Lines 103 to 106 in ffeb53a
if (os.platform() === 'win32' && (!isRemoteTest || !gdbAsync)) { | |
// win32 host can only pause remote + mi-async targets | |
this.skip(); | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a similar implementation, thanks for the suggestion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@asimgunes I have completed a review
43dfd2c
to
9b92965
Compare
Hi @jonahgraham , I updated the test scenarios and split the non-stop and all-stop cases in multithread environment. Also, switched to use Is it possible to re-check the pull-request again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM, apart from thread id == 1, see line comments
5a382b3
to
07e5814
Compare
This update implements handling mechanism for "resume" gdb signal and redirect the "resume" signal as "ContinuedEvent" as described in the Debug Adapter Protocol
07e5814
to
07aaf82
Compare
Hi @jonahgraham , I made the suggested changes, could you please review again when you are suitable? Could you please check the update when you are suitable? |
The version with this fix is published to NPM https://www.npmjs.com/package/cdt-gdb-adapter/v/1.0.1-next.20240927165134.44fda62.0 |
Includes: - Refactor code to allow web extension - eclipse-cdt-cloud/cdt-gdb-adapter#328 - Improved handling of ContinuedEvent - eclipse-cdt-cloud/cdt-gdb-adapter#335 - Ensure 'interrupt' and 'disconnect' signals are sent before '-gdb-exit' - eclipse-cdt-cloud/cdt-gdb-adapter#338 - Add API to pause target and wait for debugger to be suspended - eclipse-cdt-cloud/cdt-gdb-adapter#339
Includes: - Refactor code to allow web extension - eclipse-cdt-cloud/cdt-gdb-adapter#328 - Improved handling of ContinuedEvent - eclipse-cdt-cloud/cdt-gdb-adapter#335 - Ensure 'interrupt' and 'disconnect' signals are sent before '-gdb-exit' - eclipse-cdt-cloud/cdt-gdb-adapter#338 - Add API to pause target and wait for debugger to be suspended - eclipse-cdt-cloud/cdt-gdb-adapter#339
This update implements handling mechanism for "resume" gdb signal and redirect the "resume" signal as "ContinuedEvent" as described in the Debug Adapter Protocol.
This implementation is related to the issue #332