[RFC] Add full support for data breakpoints #1161
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
RFC - Opening this to see if you're interested in the contribution. I'm working on implementing data breakpoints in vimspector, and as always it's much easier to hack codelldb than anything else, so I implemented the extra features from DAP spec. Only lightly tested at this point.
Currently, we only provode support for data breakpoints where the request is for a child of some container using variables_reference. However, the spec includes support for:
The later two are supported via a capability
"supportsDataBreakpointBytes". We add support for all of these options.
It's fairly trivial to evaluate an expression and do esentially what we do now for children (find the load address, check its size). But we can also accept a size, so long as it's valid watchpoint size. Similarly for addresses, if 'asAddress' is supplied we can just try to use it. It will probably fail if the address is actually invalid, but that's sort of the point.