[Lldb-commits] [lldb] [lldb-dap] Create an empty target when the attach program is a process name (PR #233684)
Nathan Fusselman via lldb-commits
lldb-commits at lists.llvm.org
Tue Oct 20 09:00:01 PDT 2026
================
@@ -686,6 +686,14 @@ lldb::SBTarget DAP::CreateTarget(lldb::SBError &error) {
/*add_dependent_modules=*/true, // Add dependent modules.
error);
+ // For an attach, the program may be a process name rather than a file.
+ if (!target.IsValid() && is_attach) {
+ target = this->debugger.CreateTarget(
+ /*filename=*/"", configuration.targetTriple.c_str(),
----------------
nathanfusselman wrote:
Yes, with an empty program the first call already makes an empty target. The fallback is for when program is a process name rather than a file path (attach by name), where the first CreateTarget fails because there is no matching path.
https://github.com/llvm/llvm-project/pull/233684
More information about the lldb-commits
mailing list