[Lldb-commits] [lldb] [lldb-dap] Give attach test binaries unique names (PR #138435)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Mon May 5 10:07:36 PDT 2025
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
More information about the lldb-commits
mailing list