[Lldb-commits] [lldb] 48321ee - Check m_dyld_up directly in LoadBinariesViaMetadata
Jason Molenda via lldb-commits
lldb-commits at lists.llvm.org
Thu Nov 10 15:49:32 PST 2022
Author: Jason Molenda
Date: 2022-11-10T15:49:23-08:00
New Revision: 48321eea9679e1d8c5a30f4027e1aa49738aebf3
URL: https://github.com/llvm/llvm-project/commit/48321eea9679e1d8c5a30f4027e1aa49738aebf3
DIFF: https://github.com/llvm/llvm-project/commit/48321eea9679e1d8c5a30f4027e1aa49738aebf3.diff
LOG: Check m_dyld_up directly in LoadBinariesViaMetadata
In the restructuring I did in https://reviews.llvm.org/D133680 , I
call ObjectFile::LoadBinariesViaMetadata, and the process m_dyld
may be set by a method under there -- in
ProcessMachCore::LoadBinariesViaMetadata I wanted to check to see
if m_dyld_up had been set. I did this by calling the GetDynamicLoader()
method, but that method will call FindPlugin() if there is no
dynamic loader yet, and the static dynamic loader plugin was being
loaded, preventing the scan for userland binaries in a userland
corefile.
Differential Revision: https://reviews.llvm.org/D137807
rdar://102210820
Added:
Modified:
lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp
Removed:
################################################################################
diff --git a/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp b/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp
index 37137b34f0484..593dc8535e641 100644
--- a/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp
+++ b/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp
@@ -327,9 +327,11 @@ void ProcessMachCore::LoadBinariesViaMetadata() {
// corefile
core_objfile->LoadCoreFileImages(*this);
- // LoadCoreFileImges may have set the dynamic loader; if we now have
- // a dynamic loader, save its name so we don't un-set it later.
- if (GetDynamicLoader())
+ // LoadCoreFileImges may have set the dynamic loader, e.g. in
+ // PlatformDarwinKernel::LoadPlatformBinaryAndSetup().
+ // If we now have a dynamic loader, save its name so we don't
+ // un-set it later.
+ if (m_dyld_up)
m_dyld_plugin_name = GetDynamicLoader()->GetPluginName();
}
More information about the lldb-commits
mailing list