llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: None (GeorgeHuyubo)

<details>
<summary>Changes</summary>

Since this PR: https://github.com/llvm/llvm-project/pull/141670/

We start to override the Platform/Arch for a target if needed. However we may 
have already registered locate module callback with the old platform. So this 
fix will just ensure to set the callback to the new platform object.

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


1 Files Affected:

- (modified) lldb/source/Target/Target.cpp (+2) 


``````````diff
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index 9660fc97970b0..45a9e1196a049 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -1706,6 +1706,8 @@ bool Target::SetArchitecture(const ArchSpec &arch_spec, 
bool set_platform,
         if (PlatformSP arch_platform_sp =
                 GetDebugger().GetPlatformList().GetOrCreate(other, {},
                                                             &platform_arch)) {
+          arch_platform_sp->SetLocateModuleCallback(
+              platform_sp->GetLocateModuleCallback());
           SetPlatform(arch_platform_sp);
           if (platform_arch.IsValid())
             other = platform_arch;

``````````

</details>


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

Reply via email to