[Lldb-commits] [lldb] [lldb-dap] Adding support for cancelling a request. (PR #130169)
Adrian Vogelsgesang via lldb-commits
lldb-commits at lists.llvm.org
Thu Mar 6 15:10:54 PST 2025
================
@@ -256,7 +257,27 @@ void DAP::SendJSON(const llvm::json::Value &json) {
}
return;
}
- auto status = transport.Write(log, M);
+ Send(M);
+}
+
+void DAP::Send(const protocol::Message &M) {
+ lldb_private::Status status;
+ // If the debugger was interrupted while handling a response, mark the
+ // response as cancelled since it may contain partial information.
+ if (const auto *resp = std::get_if<protocol::Response>(&M);
+ debugger.InterruptRequested()) {
----------------
vogelsgesang wrote:
```suggestion
if (const auto *resp = std::get_if<protocol::Response>(&M);
resp && debugger.InterruptRequested()) {
```
https://github.com/llvm/llvm-project/pull/130169
More information about the lldb-commits
mailing list