-
Notifications
You must be signed in to change notification settings - Fork 43
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
setBreakpoints and setFunctionBreakpoints don't respect spec #152
Comments
See PR #154 - I have started adding (now failing) tests for each of the issues already. Only "breakpoints with multiple locations" issue does not cause a test case failure - but the MI log shows a problem. |
Latest update to PR #154 makes this fail too because instead of silently logging log-output-stream (&) messages, I changed it to be an output event on the 'log' stream. This allows the test to verify that the stream does not have a warning. |
I added "breakpoints simultaneously in multiple files". This may be a regression, not too sure, but I have added a new test for a simple case. |
OK, I imagine the problem will be around here, although I can't immediately see why: https://github.com/eclipse-cdt/cdt-gdb-adapter/blob/master/src/GDBDebugSession.ts#L280 If you've added a failing test I can look tomorrow if you get stuck. |
Oh, I think I see it. I assume I think the fix is to filter out all breakpoints except the ones for the file being dealt with. e.g.: https://github.com/eclipse-cdt/cdt-gdb-adapter/blob/master/src/GDBDebugSession.ts#L261 const file = args.source.path as string;
const gdbbps = result.BreakpointTable.body.filter((gdbbp) => {
// Only deal with breakpoints in the current file
if (gdbbp.fullname !== file) {
return false;
}
// Ignore function breakpoints
if (this.functionBreakpoints.indexOf(gdbbp.number) > -1) {
return false;
}
return true;
}); and https://github.com/eclipse-cdt/cdt-gdb-adapter/blob/master/src/GDBDebugSession.ts#L280 return !!(gdbbp.line && parseInt(gdbbp.line, 10) === vsbp.line
&& vsbpCond === gdbbpCond); |
Thanks @thegecko for the fast turnaround on fixing this. The other changes needed to address the other parts of the issue here may change the code again. I am working on the other fixes, so let me know if you are looking at any of that. |
No plans, but I'd be keen to see these fixes published as soon as possible :) |
The fixes are individually fairly straightforward - fixes on the way soon, hopefully today or tomorrow. |
The cod that compares file names is still "dodgy" - see conversation in #156 |
🐟 |
I want to fix my typo - but then no one will get the joke. |
Bug #152: Tests and fixes for numerous breakpoint issues The first commits are all the new tests, and the other commits fix specific issues. I don't plan to squash these commits, but I'll merge them with a merge commit to keep the related items together.
Everything is done in the list - except making test version dependent. The ones requiring >=8.2 are simply skipped all the time. I am going to roll this into the greater discussion of #159 |
I am reviewing the setFunctionBreakpoints and setBreakpoints a little more closely after running into a problem integrating the adapter into Eclipse with LSP4E.
There are a few issues with breakpoint handling that needs addressing, I am using this one issue to track them.
<MULTIPLE>
inaddr
field from gdb and sub breakpoints, e.g. 1.1 and 1.2 as ids) causes issues as adapter does not identify them as working together and in some cases tries to delete the multiple values.<MULTIPLE>
properly on-break-insert
- it does handle it properly on-break-list
because GDB has a different format on-break-insert
result. Thebkpt=
is not duplicated on the insert case.The text was updated successfully, but these errors were encountered: