[Lldb-commits] [lldb] [lldb-dap] Adding support for cancelling a request. (PR #130169)
John Harrison via lldb-commits
lldb-commits at lists.llvm.org
Thu Mar 20 15:33:37 PDT 2025
ashgti wrote:
> If we want to support cancellation before moving all the request over to the protocol class, can we _temporarily_ store both the JSON and the Protocol in the class we instantiate per request (whether that's the RequestHandler itself, or a class wrapping it) and use whichever one we need for that given request?
For the `LegacyRequestHandler`, its more to do with the response than the request. We can store the request as a `protocol::Message` and in the `LegacyRequestHandler` we convert it back into a `json::Value` before we pass it to the handler. But the `LegacyRequestHandler`'s all tend to call `dap.SendJSON` directly with a `json::Value`. In my current impl of the cancel request, I check for the cancelled requests prior to sending them https://github.com/llvm/llvm-project/blob/1c2d19b901390c6080c1367341115150661a6a14/lldb/tools/lldb-dap/DAP.cpp#L245-L258
https://github.com/llvm/llvm-project/pull/130169
More information about the lldb-commits
mailing list