summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SystemInitializerFull.cpp
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2018-05-24 12:44:18 +0000
committerPavel Labath <labath@google.com>2018-05-24 12:44:18 +0000
commitfa3fa5b90e9a6b349f55e74a66597078353702b0 (patch)
treee642f6f73b019c21d42cf8fd239874135063ffdb /lldb/source/API/SystemInitializerFull.cpp
parentae8ae5dc78b8c6950b57b37706dfc37131d4d913 (diff)
downloadbcm5719-llvm-fa3fa5b90e9a6b349f55e74a66597078353702b0.tar.gz
bcm5719-llvm-fa3fa5b90e9a6b349f55e74a66597078353702b0.zip
Move ObjectFile initialization out of SystemInitializerCommon
Summary: For lldb-server, it is sufficient to parse only the native object file format for its target OS (no other file can be loaded into a running process). This moves the object file initialization code into specific initializer classes: lldb-test and liblldb get all object files; lldb-server gets only one of them. For this to work, I've needed to create a special SystemInitializer for use in lldb-server, instead of it calling directly into the common one. This reduces the size of lldb-server by about 2%, which is not earth-shattering, but it's an easy win, and it helps. Reviewers: zturner, clayborg Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D47250 llvm-svn: 333182
Diffstat (limited to 'lldb/source/API/SystemInitializerFull.cpp')
-rw-r--r--lldb/source/API/SystemInitializerFull.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/lldb/source/API/SystemInitializerFull.cpp b/lldb/source/API/SystemInitializerFull.cpp
index 1e2a064384a..ee87ca316cd 100644
--- a/lldb/source/API/SystemInitializerFull.cpp
+++ b/lldb/source/API/SystemInitializerFull.cpp
@@ -70,6 +70,9 @@
#include "Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h"
#include "Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h"
#include "Plugins/MemoryHistory/asan/MemoryHistoryASan.h"
+#include "Plugins/ObjectFile/ELF/ObjectFileELF.h"
+#include "Plugins/ObjectFile/Mach-O/ObjectFileMachO.h"
+#include "Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h"
#include "Plugins/OperatingSystem/Go/OperatingSystemGo.h"
#include "Plugins/OperatingSystem/Python/OperatingSystemPython.h"
#include "Plugins/Platform/Android/PlatformAndroid.h"
@@ -251,6 +254,11 @@ SystemInitializerFull::~SystemInitializerFull() {}
void SystemInitializerFull::Initialize() {
SystemInitializerCommon::Initialize();
+
+ ObjectFileELF::Initialize();
+ ObjectFileMachO::Initialize();
+ ObjectFilePECOFF::Initialize();
+
ScriptInterpreterNone::Initialize();
#ifndef LLDB_DISABLE_PYTHON
@@ -514,6 +522,10 @@ void SystemInitializerFull::Terminate() {
PlatformDarwinKernel::Terminate();
#endif
+ ObjectFileELF::Terminate();
+ ObjectFileMachO::Terminate();
+ ObjectFilePECOFF::Terminate();
+
// Now shutdown the common parts, in reverse order.
SystemInitializerCommon::Terminate();
}
OpenPOWER on IntegriCloud