llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Dmitry Vasilyev (slydiman)

<details>
<summary>Changes</summary>

Install the image to the remote target if necessary. Platform::LoadImage() uses 
the following logic before DoLoadImage()
```
if (IsRemote() || local_file != remote_file) {
  error = Install(local_file, remote_file);
  ...
}
```
The FileSpec for the local path may be resolved, so it is necessary to use the 
condition `if lldb.remote_platform:`.

---
Full diff: https://github.com/llvm/llvm-project/pull/92281.diff


1 Files Affected:

- (modified) lldb/test/API/functionalities/completion/TestCompletion.py (+14-3) 


``````````diff
diff --git a/lldb/test/API/functionalities/completion/TestCompletion.py 
b/lldb/test/API/functionalities/completion/TestCompletion.py
index 0d6907e0c3d22..9959c7363aa2b 100644
--- a/lldb/test/API/functionalities/completion/TestCompletion.py
+++ b/lldb/test/API/functionalities/completion/TestCompletion.py
@@ -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,
+            )
         self.assertSuccess(err)
 
         self.complete_from_to("process unload ", "process unload 0")

``````````

</details>


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

Reply via email to