[Lldb-commits] [lldb] [lldb-dap] Specify the executable path in the attach info (PR #138557)
Jacob Lalonde via lldb-commits
lldb-commits at lists.llvm.org
Mon May 5 11:26:43 PDT 2025
================
@@ -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
More information about the lldb-commits
mailing list