[Lldb-commits] [lldb] [lldb] Recognise a module the target already has under another path spelling (PR #226311)
Med Ismail Bennani via lldb-commits
lldb-commits at lists.llvm.org
Thu Sep 24 21:58:00 PDT 2026
================
@@ -2447,6 +2447,27 @@ bool Target::ReadPointerFromMemory(const Address &addr, Status &error,
return false;
}
+/// Find a module in \a images that is the same file as \a module reached by a
+/// different spelling of its path. The UUID establishes that the two describe
+/// the same file.
+static ModuleSP FindEquivalentModule(const ModuleList &images, Module &module) {
+ ModuleSpec uuid_spec;
+ uuid_spec.GetUUID() = module.GetUUID();
+ ModuleList matches;
+ images.FindModules(uuid_spec, matches);
+
+ llvm::StringRef filename = module.GetFileSpec().GetFilename();
+ ModuleSP equivalent_sp;
+ matches.ForEach([&](const ModuleSP &match_sp) {
+ if (match_sp.get() == &module ||
+ match_sp->GetFileSpec().GetFilename() != filename)
----------------
medismailben wrote:
So IIUC, you can have multiple modules with matching UUID but be completely different libraries. Is that actually possible ?
https://github.com/llvm/llvm-project/pull/226311
More information about the lldb-commits
mailing list