From 7bbb34e11f966028aba58114063f2c2482272bc5 Mon Sep 17 00:00:00 2001 From: Jeffrey Tan Date: Tue, 10 Jun 2025 15:58:58 -0700 Subject: [PATCH] Check object offset in ModuleSpec matching --- lldb/source/Core/Module.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp index 796e45570bea5..0cb7a737d0f29 100644 --- a/lldb/source/Core/Module.cpp +++ b/lldb/source/Core/Module.cpp @@ -1538,6 +1538,9 @@ bool Module::MatchesModuleSpec(const ModuleSpec &module_ref) { if (!FileSpec::Match(platform_file_spec, GetPlatformFileSpec())) return false; + if (m_object_offset != module_ref.GetObjectOffset()) + return false; + const ArchSpec &arch = module_ref.GetArchitecture(); if (arch.IsValid()) { if (!m_arch.IsCompatibleMatch(arch))