[Lldb-commits] [lldb] [lldb] Fixed the TestCompletion test running on a remote target (PR #92281)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Wed May 15 08:46:01 PDT 2024
================
@@ -107,9 +107,20 @@ def test_process_unload(self):
self, "// Break here", lldb.SBFileSpec("main.cpp")
)
err = lldb.SBError()
- self.process().LoadImage(
- lldb.SBFileSpec(self.getBuildArtifact("libshared.so")), err
- )
+ if lldb.remote_platform:
+ self.process().LoadImage(
+ lldb.SBFileSpec(self.getBuildArtifact("libshared.so")),
+ lldb.SBFileSpec(
+ lldbutil.append_to_process_working_directory(self, "libshared.so"),
+ False,
+ ),
+ err,
+ )
+ else:
+ self.process().LoadImage(
+ lldb.SBFileSpec(self.getBuildArtifact("libshared.so")),
+ err,
+ )
----------------
JDevlieghere wrote:
I think this can be simplified to:
```
err = lldb.SBError()
local_spec = lldb.SBFileSpec(self.getBuildArtifact("libshared.so"))
remote_spec = lldb.SBFileSpec(lldbutil.append_to_process_working_directory(self, "libshared.so"), false) if lldb.remote_platform else lldb.SBFileSpec()
self.process().LoadImage(local_spec, remote_spec)
```
https://github.com/llvm/llvm-project/pull/92281
More information about the lldb-commits
mailing list