Author: Jason Molenda Date: 2023-03-09T14:56:22-08:00 New Revision: 7f25c3e25f0afa91ae47c7247cca7fabaa2a7dd5
URL: https://github.com/llvm/llvm-project/commit/7f25c3e25f0afa91ae47c7247cca7fabaa2a7dd5 DIFF: https://github.com/llvm/llvm-project/commit/7f25c3e25f0afa91ae47c7247cca7fabaa2a7dd5.diff LOG: Slight refinement to a change yesterday in metadata-added binaries When ObjectFileMachO::LoadCoreFileImages load a binary into the target with a valid load address, we don't need to re-load its segments into the Target's SectionLoadList again. But we should still call ModulesDidLoad on these modules so breakpoints can be inserted etc. Added: Modified: lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp Removed: ################################################################################ diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp index c5f04557ae611..391ed99607f77 100644 --- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp +++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp @@ -7032,8 +7032,12 @@ bool ObjectFileMachO::LoadCoreFileImages(lldb_private::Process &process) { &process, image.filename, image.uuid, image.load_address, false /* value_is_offset */, image.currently_executing, false /* notify */); - if (module_sp) + if (module_sp) { + // We've already set the load address in the Target, + // don't do any more processing on this module. + added_modules.Append(module_sp, false /* notify */); continue; + } } // If we have a slide, we need to find the original binary @@ -7044,8 +7048,12 @@ bool ObjectFileMachO::LoadCoreFileImages(lldb_private::Process &process) { &process, image.filename, image.uuid, image.slide, true /* value_is_offset */, image.currently_executing, false /* notify */); - if (module_sp) + if (module_sp) { + // We've already set the load address in the Target, + // don't do any more processing on this module. + added_modules.Append(module_sp, false /* notify */); continue; + } } // Try to find the binary by UUID or filename on the local _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits