diff options
author | Jordan Rupprecht <rupprecht@google.com> | 2020-09-30 11:24:10 -0700 |
---|---|---|
committer | Jordan Rupprecht <rupprecht@google.com> | 2020-09-30 11:32:06 -0700 |
commit | ad865d9d10b8cf93738470175aae1be7a4a3eb6b (patch) | |
tree | 80042fbaecf03665f5d08615e4ec7013d529b6da /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 655af658c93bf7f133341e7eb5a2dfa176282781 (diff) | |
download | llvm-ad865d9d10b8cf93738470175aae1be7a4a3eb6b.zip llvm-ad865d9d10b8cf93738470175aae1be7a4a3eb6b.tar.gz llvm-ad865d9d10b8cf93738470175aae1be7a4a3eb6b.tar.bz2 |
[lldb-vscode] Allow an empty 'breakpoints' field to clear breakpoints.
Per the DAP spec for SetBreakpoints [1], the way to clear breakpoints is: `To clear all breakpoint for a source, specify an empty array.`
However, leaving the breakpoints field unset is also a well formed request (note the `breakpoints?:` in the `SetBreakpointsArguments` definition). If it's unset, we have a couple choices:
1. Crash (current behavior)
2. Clear breakpoints
3. Return an error response that the breakpoints field is missing.
I propose we do (2) instead of (1), and treat an unset breakpoints field the same as an empty breakpoints field.
[1] https://microsoft.github.io/debug-adapter-protocol/specification#Requests_SetBreakpoints
Reviewed By: wallace, labath
Differential Revision: https://reviews.llvm.org/D88513
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions