[Lldb-commits] [lldb] r264735 - Move DynamicLoader plugins to SystemInitializerFull

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 29 08:00:26 PDT 2016


Author: labath
Date: Tue Mar 29 10:00:26 2016
New Revision: 264735

URL: http://llvm.org/viewvc/llvm-project?rev=264735&view=rev
Log:
Move DynamicLoader plugins to SystemInitializerFull

Summary: These are not needed by lldb-server. Removing them shrinks the server by about 0.5%.

Reviewers: zturner

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D18206

Modified:
    lldb/trunk/source/API/SystemInitializerFull.cpp
    lldb/trunk/source/Initialization/SystemInitializerCommon.cpp

Modified: lldb/trunk/source/API/SystemInitializerFull.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SystemInitializerFull.cpp?rev=264735&r1=264734&r2=264735&view=diff
==============================================================================
--- lldb/trunk/source/API/SystemInitializerFull.cpp (original)
+++ lldb/trunk/source/API/SystemInitializerFull.cpp Tue Mar 29 10:00:26 2016
@@ -42,6 +42,9 @@
 #include "Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h"
 #include "Plugins/Disassembler/llvm/DisassemblerLLVMC.h"
 #include "Plugins/DynamicLoader/Static/DynamicLoaderStatic.h"
+#include "Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h"
+#include "Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h"
+#include "Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.h"
 #include "Plugins/Instruction/ARM64/EmulateInstructionARM64.h"
 #include "Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.h"
 #include "Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.h"
@@ -81,6 +84,7 @@
 #include "Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.h"
 #include "Plugins/Platform/MacOSX/PlatformRemoteAppleTV.h"
 #include "Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.h"
+#include "Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h"
 #endif
 
 #if defined(__FreeBSD__)
@@ -345,6 +349,7 @@ SystemInitializerFull::Initialize()
     PlatformAppleWatchSimulator::Initialize();
     PlatformRemoteAppleTV::Initialize();
     PlatformRemoteAppleWatch::Initialize();
+    DynamicLoaderDarwinKernel::Initialize();
 #endif
     //----------------------------------------------------------------------
     // Platform agnostic plugins
@@ -352,7 +357,10 @@ SystemInitializerFull::Initialize()
     platform_gdb_server::PlatformRemoteGDBServer::Initialize();
 
     process_gdb_remote::ProcessGDBRemote::Initialize();
+    DynamicLoaderMacOSXDYLD::Initialize();
+    DynamicLoaderPOSIXDYLD::Initialize();
     DynamicLoaderStatic::Initialize();
+    DynamicLoaderWindowsDYLD::Initialize();
 
     // Scan for any system or user LLDB plug-ins
     PluginManager::Initialize();
@@ -454,6 +462,7 @@ SystemInitializerFull::Terminate()
     ObjCPlusPlusLanguage::Terminate();
 
 #if defined(__APPLE__)
+    DynamicLoaderDarwinKernel::Terminate();
     ProcessMachCore::Terminate();
     ProcessKDP::Terminate();
     SymbolVendorMacOSX::Terminate();
@@ -470,7 +479,10 @@ SystemInitializerFull::Terminate()
 
     platform_gdb_server::PlatformRemoteGDBServer::Terminate();
     process_gdb_remote::ProcessGDBRemote::Terminate();
+    DynamicLoaderMacOSXDYLD::Terminate();
+    DynamicLoaderPOSIXDYLD::Terminate();
     DynamicLoaderStatic::Terminate();
+    DynamicLoaderWindowsDYLD::Terminate();
 
 #ifndef LLDB_DISABLE_PYTHON
     OperatingSystemPython::Terminate();

Modified: lldb/trunk/source/Initialization/SystemInitializerCommon.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Initialization/SystemInitializerCommon.cpp?rev=264735&r1=264734&r2=264735&view=diff
==============================================================================
--- lldb/trunk/source/Initialization/SystemInitializerCommon.cpp (original)
+++ lldb/trunk/source/Initialization/SystemInitializerCommon.cpp Tue Mar 29 10:00:26 2016
@@ -15,9 +15,6 @@
 #include "lldb/Core/Timer.h"
 #include "lldb/Symbol/GoASTContext.h"
 #include "lldb/Symbol/ClangASTContext.h"
-#include "Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h"
-#include "Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h"
-#include "Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.h"
 #include "Plugins/Instruction/ARM/EmulateInstructionARM.h"
 #include "Plugins/Instruction/MIPS/EmulateInstructionMIPS.h"
 #include "Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.h"
@@ -37,7 +34,6 @@
 
 #if defined(__APPLE__)
 #include "Plugins/Platform/MacOSX/PlatformiOSSimulator.h"
-#include "Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h"
 #include "Plugins/ObjectFile/Mach-O/ObjectFileMachO.h"
 #include "Plugins/Platform/MacOSX/PlatformDarwinKernel.h"
 #endif
@@ -108,8 +104,6 @@ SystemInitializerCommon::Initialize()
     ObjectContainerBSDArchive::Initialize();
     ObjectFileELF::Initialize();
     ObjectFilePECOFF::Initialize();
-    DynamicLoaderPOSIXDYLD::Initialize();
-    DynamicLoaderWindowsDYLD::Initialize();
     platform_freebsd::PlatformFreeBSD::Initialize();
     platform_linux::PlatformLinux::Initialize();
     platform_netbsd::PlatformNetBSD::Initialize();
@@ -124,7 +118,6 @@ SystemInitializerCommon::Initialize()
     //----------------------------------------------------------------------
     // Apple/Darwin hosted plugins
     //----------------------------------------------------------------------
-    DynamicLoaderMacOSXDYLD::Initialize();
     ObjectContainerUniversalMachO::Initialize();
 
     PlatformRemoteiOS::Initialize();
@@ -132,7 +125,6 @@ SystemInitializerCommon::Initialize()
 
 #if defined(__APPLE__)
     PlatformiOSSimulator::Initialize();
-    DynamicLoaderDarwinKernel::Initialize();
     PlatformDarwinKernel::Initialize();
     ObjectFileMachO::Initialize();
 #endif
@@ -152,15 +144,12 @@ SystemInitializerCommon::Terminate()
     ObjectContainerBSDArchive::Terminate();
     ObjectFileELF::Terminate();
     ObjectFilePECOFF::Terminate();
-    DynamicLoaderPOSIXDYLD::Terminate();
-    DynamicLoaderWindowsDYLD::Terminate();
     platform_freebsd::PlatformFreeBSD::Terminate();
     platform_linux::PlatformLinux::Terminate();
     platform_netbsd::PlatformNetBSD::Terminate();
     PlatformWindows::Terminate();
     PlatformKalimba::Terminate();
     platform_android::PlatformAndroid::Terminate();
-    DynamicLoaderMacOSXDYLD::Terminate();
     ObjectContainerUniversalMachO::Terminate();
     PlatformMacOSX::Terminate();
     PlatformRemoteiOS::Terminate();
@@ -174,7 +163,6 @@ SystemInitializerCommon::Terminate()
 
 #if defined(__APPLE__)
     PlatformiOSSimulator::Terminate();
-    DynamicLoaderDarwinKernel::Terminate();
     ObjectFileMachO::Terminate();
     PlatformDarwinKernel::Terminate();
 #endif




More information about the lldb-commits mailing list