File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
lldb/tools/lldb-dap/Handler Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -80,8 +80,7 @@ Error AttachRequestHandler::Run(const AttachRequestArguments &args) const {
8080 // Disable async events so the attach will be successful when we return from
8181 // the launch call and the launch will happen synchronously
8282 ScopeSyncMode scope_sync_mode (dap.debugger );
83-
84- dap.debugger .SetAsync (false );
83+
8584 if (args.coreFile .empty ()) {
8685 if (args.gdbRemotePort != LLDB_DAP_INVALID_PORT) {
8786 lldb::SBListener listener = dap.debugger .GetListener ();
@@ -112,6 +111,9 @@ Error AttachRequestHandler::Run(const AttachRequestArguments &args) const {
112111 // The custom commands might have created a new target so we should use the
113112 // selected target after these commands are run.
114113 dap.target = dap.debugger .GetSelectedTarget ();
114+ if (!dap.target .IsValid ())
115+ return make_error<DAPError>(
116+ " attachCommands failed to create a valid target" );
115117
116118 // Make sure the process is attached and stopped before proceeding as the
117119 // the launch commands are not run using the synchronous mode.
You can’t perform that action at this time.
0 commit comments