jgorbe created this revision. jgorbe added reviewers: ted, luporl, wallace. jgorbe added a project: LLDB. Herald added a subscriber: JDevlieghere. Herald added a project: All. jgorbe requested review of this revision.
After https://reviews.llvm.org/D147831, lldb-vscode doesn't send a process event after launch/attach in case of failure. I believe this is the right interpretation of the spec, because the description of the event says: > The event indicates that the debugger has begun debugging a new > process. and we haven't started debugging a process if there's no process because we failed to launch it. This is also supported by the fact that `request_launch` in vscode.py doesn't wait for the event if passed `expectFailure=True`. However, this doesn't take into account *unexpected* launch failures. In that case, `request_launch` will hang indefinitely waiting for the process event. This patch changes it so we'll only wait for these events if `request["success"]` is true, independently of whether any failure was expected or not. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D150470 Files: lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py Index: lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py =================================================================== --- lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py +++ lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py @@ -661,8 +661,7 @@ stopCommands=None, exitCommands=None, terminateCommands=None ,sourcePath=None, debuggerRoot=None, launchCommands=None, sourceMap=None, - runInTerminal=False, expectFailure=False, - postRunCommands=None): + runInTerminal=False, postRunCommands=None): args_dict = { 'program': program } @@ -712,7 +711,7 @@ } response = self.send_recv(command_dict) - if not expectFailure: + if response['success']: # Wait for a 'process' and 'initialized' event in any order self.wait_for_event(filter=['process', 'initialized']) self.wait_for_event(filter=['process', 'initialized']) Index: lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py =================================================================== --- lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py +++ lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py @@ -322,7 +322,6 @@ launchCommands=launchCommands, sourceMap=sourceMap, runInTerminal=runInTerminal, - expectFailure=expectFailure, postRunCommands=postRunCommands) if expectFailure:
Index: lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py =================================================================== --- lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py +++ lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py @@ -661,8 +661,7 @@ stopCommands=None, exitCommands=None, terminateCommands=None ,sourcePath=None, debuggerRoot=None, launchCommands=None, sourceMap=None, - runInTerminal=False, expectFailure=False, - postRunCommands=None): + runInTerminal=False, postRunCommands=None): args_dict = { 'program': program } @@ -712,7 +711,7 @@ } response = self.send_recv(command_dict) - if not expectFailure: + if response['success']: # Wait for a 'process' and 'initialized' event in any order self.wait_for_event(filter=['process', 'initialized']) self.wait_for_event(filter=['process', 'initialized']) Index: lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py =================================================================== --- lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py +++ lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py @@ -322,7 +322,6 @@ launchCommands=launchCommands, sourceMap=sourceMap, runInTerminal=runInTerminal, - expectFailure=expectFailure, postRunCommands=postRunCommands) if expectFailure:
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits