Skip to content

Commit ec6828c

Browse files
authored
[lldb-dap] Remove an incorrect assumption on reverse requests. (#136210)
Reverse requests do have a 'seq' set still from VSCode. I incorrectly interpreted https://github.com/microsoft/vscode/blob/dede7bb4b7e9c9ec69155a243bb84037a40588fe/src/vs/workbench/contrib/debug/common/abstractDebugAdapter.ts#L65 to mean they have a 'seq' of '0', however the 'seq' is set in 'internalSend' here https://github.com/microsoft/vscode/blob/dede7bb4b7e9c9ec69155a243bb84037a40588fe/src/vs/workbench/contrib/debug/common/abstractDebugAdapter.ts#L178. Removing the check that 'seq=0' on reverse requests and updating the dap_server.py impl to also set the seq.
1 parent f347a06 commit ec6828c

File tree

2 files changed

+0
-9
lines changed

2 files changed

+0
-9
lines changed

lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -343,25 +343,21 @@ def send_recv(self, command):
343343
self.send_packet(
344344
{
345345
"type": "response",
346-
"seq": 0,
347346
"request_seq": response_or_request["seq"],
348347
"success": True,
349348
"command": "runInTerminal",
350349
"body": {},
351350
},
352-
set_sequence=False,
353351
)
354352
elif response_or_request["command"] == "startDebugging":
355353
self.send_packet(
356354
{
357355
"type": "response",
358-
"seq": 0,
359356
"request_seq": response_or_request["seq"],
360357
"success": True,
361358
"command": "startDebugging",
362359
"body": {},
363360
},
364-
set_sequence=False,
365361
)
366362
else:
367363
desc = 'unknown reverse request "%s"' % (

lldb/tools/lldb-dap/Protocol/ProtocolBase.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,6 @@ bool fromJSON(json::Value const &Params, Response &R, json::Path P) {
163163
return false;
164164
}
165165

166-
if (seq != 0) {
167-
P.field("seq").report("expected to be '0'");
168-
return false;
169-
}
170-
171166
if (R.command.empty()) {
172167
P.field("command").report("expected to not be ''");
173168
return false;

0 commit comments

Comments
 (0)