From 8db8a4e8eddf91bfaee62f83ff10a51e7125d4e4 Mon Sep 17 00:00:00 2001 From: Jason Molenda Date: Wed, 8 Mar 2023 17:59:46 -0800 Subject: Clean up conditional, don't set load binaries twice Follow Alex Langford's feedback to my patch from https://reviews.llvm.org/D145547 , and fix a side issue I noticed while testing this, where binaries loaded via LC_NOTE metadata were loaded in the Target twice unnecessarily. --- lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp') diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp index d41279ce864c..c5f04557ae61 100644 --- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp +++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp @@ -7032,6 +7032,8 @@ 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) + continue; } // If we have a slide, we need to find the original binary @@ -7042,6 +7044,8 @@ 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) + continue; } // Try to find the binary by UUID or filename on the local -- cgit v1.2.3