JDevlieghere wrote:

> I see a comment in `TestDAP_attach.test_by_name` that mentions making the 
> path more unique, so I'm wondering if something else has changed or if that 
> previous attempt at making the name more unique was a little off the mark.

Excellent question. We are indeed only using the executable name for the 
attach. Note how the AttachRequestHandler isn't setting the path in the attach 
info. We only use the program to create the target, which means we go down this 
path in `Target::Attach`:

```
  // If no process info was specified, then use the target executable name as
  // the process to attach to by default
  if (!attach_info.ProcessInfoSpecified()) {
    if (old_exec_module_sp)
      attach_info.GetExecutableFile().SetFilename(
            old_exec_module_sp->GetPlatformFileSpec().GetFilename());
    [...]

  }

```

I still think the unique test names are preferable over the old logic to change 
the directory, but we should fix this too. 

https://github.com/llvm/llvm-project/pull/138435
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to