summaryrefslogtreecommitdiff
path: root/lldb/tools/lldb-vscode/lldb-vscode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/tools/lldb-vscode/lldb-vscode.cpp')
-rw-r--r--lldb/tools/lldb-vscode/lldb-vscode.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/lldb/tools/lldb-vscode/lldb-vscode.cpp b/lldb/tools/lldb-vscode/lldb-vscode.cpp
index f56a5368939e..126719e1494e 100644
--- a/lldb/tools/lldb-vscode/lldb-vscode.cpp
+++ b/lldb/tools/lldb-vscode/lldb-vscode.cpp
@@ -1963,11 +1963,13 @@ void request_restart(const llvm::json::Object &request) {
// The optional `arguments` field in RestartRequest can contain an updated
// version of the launch arguments. If there's one, use it.
- auto request_arguments = request.getObject("arguments");
- if (request_arguments) {
- llvm::json::Object arguments = *request_arguments;
- (*g_vsc.last_launch_or_attach_request)["arguments"] =
- llvm::json::Value(std::move(arguments));
+ auto restart_arguments = request.getObject("arguments");
+ if (restart_arguments) {
+ auto launch_request_arguments = restart_arguments->getObject("arguments");
+ if (launch_request_arguments) {
+ (*g_vsc.last_launch_or_attach_request)["arguments"] =
+ llvm::json::Value(llvm::json::Object(*launch_request_arguments));
+ }
}
// Keep track of the old PID so when we get a "process exited" event from the