[Lldb-commits] [lldb] r356110 - [lldb-vscode] Don't try to launch an invalid program.
Jorge Gorbe Moya via lldb-commits
lldb-commits at lists.llvm.org
Wed Mar 13 16:50:35 PDT 2019
Author: jgorbe
Date: Wed Mar 13 16:50:35 2019
New Revision: 356110
URL: http://llvm.org/viewvc/llvm-project?rev=356110&view=rev
Log:
[lldb-vscode] Don't try to launch an invalid program.
If an invalid program is specified, lldb-vscode will send back a
response with "success" = false, but then will continue executing the
rest of request_launch(), try to launch the program anyway and try to
send another response (possibly using the `response` object after it was
moved).
This change adds a return statement so we stop executing the handler
after producing the first failing response.
Differential Revision: https://reviews.llvm.org/D59340
Modified:
lldb/trunk/tools/lldb-vscode/lldb-vscode.cpp
Modified: lldb/trunk/tools/lldb-vscode/lldb-vscode.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/lldb-vscode.cpp?rev=356110&r1=356109&r2=356110&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-vscode/lldb-vscode.cpp (original)
+++ lldb/trunk/tools/lldb-vscode/lldb-vscode.cpp Wed Mar 13 16:50:35 2019
@@ -1245,6 +1245,7 @@ void request_launch(const llvm::json::Ob
response, "message",
llvm::formatv("Could not load program '{0}'.", program).str());
g_vsc.SendJSON(llvm::json::Value(std::move(response)));
+ return;
}
}
More information about the lldb-commits
mailing list