================ @@ -161,7 +157,13 @@ void AttachRequestHandler::operator()(const llvm::json::Object &request) const { dap.target.ConnectRemote(listener, connect_url.c_str(), "gdb-remote", error); } else { - // Attach by process name or id. + // Attach by pid or process name. + lldb::SBAttachInfo attach_info; + if (pid != LLDB_INVALID_PROCESS_ID) + attach_info.SetProcessID(pid); + if (dap.configuration.program.has_value()) ---------------- Jlalond wrote:
just a nit, but wouldn't an `if else` make sense here, because if we have the pid we don't even need to send the executable path in the attach info? https://github.com/llvm/llvm-project/pull/138557 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits