blob: 5cf4b659c36d05ee90642057a4097ae3aa05046a [file] [log] [blame]
Zachary Turnere6e2bb32015-03-31 21:03:22 +00001//===-- SystemInitializerFull.cpp -------------------------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
Zachary Turner2c1f46d2015-07-30 20:28:07 +000010#if !defined(LLDB_DISABLE_PYTHON)
11#include "Plugins/ScriptInterpreter/Python/lldb-python.h"
12#endif
13
Zachary Turnere6e2bb32015-03-31 21:03:22 +000014#include "lldb/API/SystemInitializerFull.h"
15
Zachary Turner2c1f46d2015-07-30 20:28:07 +000016#include "lldb/API/SBCommandInterpreter.h"
17
18#if !defined(LLDB_DISABLE_PYTHON)
19#include "Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h"
20#endif
21
Zachary Turnere6e2bb32015-03-31 21:03:22 +000022#include "lldb/Core/Debugger.h"
23#include "lldb/Core/Timer.h"
24#include "lldb/Host/Host.h"
25#include "lldb/Initialization/SystemInitializerCommon.h"
Zachary Turner2c1f46d2015-07-30 20:28:07 +000026#include "lldb/Interpreter/CommandInterpreter.h"
Greg Clayton56939cb2015-09-17 22:23:34 +000027#include "lldb/Symbol/ClangASTContext.h"
28#include "lldb/Symbol/GoASTContext.h"
Tamas Berghammer87a97692016-02-26 14:21:23 +000029#include "lldb/Symbol/JavaASTContext.h"
Zachary Turnere6e2bb32015-03-31 21:03:22 +000030
Zachary Turnere6e2bb32015-03-31 21:03:22 +000031#include "Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h"
32#include "Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.h"
Zachary Turner74e08ca2016-03-02 22:05:52 +000033#include "Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h"
Omair Javaid52f825b2015-04-29 10:49:45 +000034#include "Plugins/ABI/SysV-arm/ABISysV_arm.h"
Omair Javaidb78e05f2015-04-29 11:52:35 +000035#include "Plugins/ABI/SysV-arm64/ABISysV_arm64.h"
Ted Woodwardbff0a212015-12-10 17:53:07 +000036#include "Plugins/ABI/SysV-hexagon/ABISysV_hexagon.h"
Greg Claytonb289cba2015-06-25 17:50:15 +000037#include "Plugins/ABI/SysV-i386/ABISysV_i386.h"
Bhushan D. Attardea8219f22015-06-18 07:02:10 +000038#include "Plugins/ABI/SysV-mips/ABISysV_mips.h"
Bhushan D. Attarde13f54252015-06-19 04:25:07 +000039#include "Plugins/ABI/SysV-mips64/ABISysV_mips64.h"
Zachary Turner74e08ca2016-03-02 22:05:52 +000040#include "Plugins/ABI/SysV-ppc/ABISysV_ppc.h"
41#include "Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h"
42#include "Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h"
Zachary Turnere6e2bb32015-03-31 21:03:22 +000043#include "Plugins/Disassembler/llvm/DisassemblerLLVMC.h"
44#include "Plugins/DynamicLoader/Static/DynamicLoaderStatic.h"
Zachary Turnere6e2bb32015-03-31 21:03:22 +000045#include "Plugins/Instruction/ARM64/EmulateInstructionARM64.h"
Zachary Turnere6e2bb32015-03-31 21:03:22 +000046#include "Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.h"
47#include "Plugins/JITLoader/GDB/JITLoaderGDB.h"
Enrico Granata980c0482015-09-01 18:22:39 +000048#include "Plugins/Language/CPlusPlus/CPlusPlusLanguage.h"
Ryan Brown2dd84882015-11-05 00:24:36 +000049#include "Plugins/Language/Go/GoLanguage.h"
Tamas Berghammer87a97692016-02-26 14:21:23 +000050#include "Plugins/Language/Java/JavaLanguage.h"
Enrico Granata980c0482015-09-01 18:22:39 +000051#include "Plugins/Language/ObjC/ObjCLanguage.h"
52#include "Plugins/Language/ObjCPlusPlus/ObjCPlusPlusLanguage.h"
Zachary Turnere6e2bb32015-03-31 21:03:22 +000053#include "Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h"
Ryan Brown07a1c452015-10-06 20:29:31 +000054#include "Plugins/LanguageRuntime/Go/GoLanguageRuntime.h"
Tamas Berghammer87a97692016-02-26 14:21:23 +000055#include "Plugins/LanguageRuntime/Java/JavaLanguageRuntime.h"
Zachary Turner74e08ca2016-03-02 22:05:52 +000056#include "Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h"
57#include "Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h"
Colin Riley5ec532a2015-04-09 16:49:25 +000058#include "Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h"
Zachary Turnere6e2bb32015-03-31 21:03:22 +000059#include "Plugins/MemoryHistory/asan/MemoryHistoryASan.h"
Pavel Labatha7760cb2016-03-16 08:48:56 +000060#include "Plugins/OperatingSystem/Python/OperatingSystemPython.h"
61#include "Plugins/OperatingSystem/Go/OperatingSystemGo.h"
Zachary Turnere6e2bb32015-03-31 21:03:22 +000062#include "Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h"
63#include "Plugins/Process/elf-core/ProcessElfCore.h"
64#include "Plugins/Process/gdb-remote/ProcessGDBRemote.h"
Zachary Turner2c1f46d2015-07-30 20:28:07 +000065#include "Plugins/ScriptInterpreter/None/ScriptInterpreterNone.h"
Zachary Turnere6e2bb32015-03-31 21:03:22 +000066#include "Plugins/SymbolFile/DWARF/SymbolFileDWARF.h"
67#include "Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h"
Zachary Turner74e08ca2016-03-02 22:05:52 +000068#include "Plugins/SymbolFile/PDB/SymbolFilePDB.h"
Zachary Turnere6e2bb32015-03-31 21:03:22 +000069#include "Plugins/SymbolFile/Symtab/SymbolFileSymtab.h"
70#include "Plugins/SymbolVendor/ELF/SymbolVendorELF.h"
71#include "Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.h"
Zachary Turnere6e2bb32015-03-31 21:03:22 +000072#include "Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h"
Zachary Turner74e08ca2016-03-02 22:05:52 +000073#include "Plugins/UnwindAssembly/x86/UnwindAssembly-x86.h"
Zachary Turnere6e2bb32015-03-31 21:03:22 +000074
75#if defined(__APPLE__)
76#include "Plugins/Process/mach-core/ProcessMachCore.h"
77#include "Plugins/Process/MacOSX-Kernel/ProcessKDP.h"
78#include "Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.h"
Jason Molenda5e88be92015-11-06 00:22:53 +000079#include "Plugins/Platform/MacOSX/PlatformAppleTVSimulator.h"
80#include "Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.h"
81#include "Plugins/Platform/MacOSX/PlatformRemoteAppleTV.h"
82#include "Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.h"
Zachary Turnere6e2bb32015-03-31 21:03:22 +000083#endif
84
85#if defined(__FreeBSD__)
86#include "Plugins/Process/FreeBSD/ProcessFreeBSD.h"
87#endif
88
Zachary Turnere6e2bb32015-03-31 21:03:22 +000089#if defined(_MSC_VER)
90#include "lldb/Host/windows/windows.h"
Adrian McCarthy18a9135d2015-10-28 18:21:45 +000091#include "Plugins/Process/Windows/Live/ProcessWindowsLive.h"
Adrian McCarthy27785dd2015-08-24 16:00:51 +000092#include "Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.h"
Zachary Turnere6e2bb32015-03-31 21:03:22 +000093#endif
94
Zachary Turnere6e2bb32015-03-31 21:03:22 +000095#include "llvm/Support/TargetSelect.h"
96
97#include <string>
98
99using namespace lldb_private;
100
101#ifndef LLDB_DISABLE_PYTHON
102
103// Defined in the SWIG source file
Zachary Turnerc5b41d62015-10-16 17:52:03 +0000104#if PY_MAJOR_VERSION >= 3
105extern "C" PyObject*
106PyInit__lldb(void);
107
108#define LLDBSwigPyInit PyInit__lldb
109
110#else
Ed Maste81b4c5f2016-01-04 01:43:47 +0000111extern "C" void
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000112init_lldb(void);
113
Zachary Turnerc5b41d62015-10-16 17:52:03 +0000114#define LLDBSwigPyInit init_lldb
115#endif
116
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000117// these are the Pythonic implementations of the required callbacks
118// these are scripting-language specific, which is why they belong here
119// we still need to use function pointers to them instead of relying
120// on linkage-time resolution because the SWIG stuff and this file
121// get built at different times
122extern "C" bool
123LLDBSwigPythonBreakpointCallbackFunction (const char *python_function_name,
124 const char *session_dictionary_name,
125 const lldb::StackFrameSP& sb_frame,
126 const lldb::BreakpointLocationSP& sb_bp_loc);
127
128extern "C" bool
129LLDBSwigPythonWatchpointCallbackFunction (const char *python_function_name,
130 const char *session_dictionary_name,
131 const lldb::StackFrameSP& sb_frame,
132 const lldb::WatchpointSP& sb_wp);
133
134extern "C" bool
135LLDBSwigPythonCallTypeScript (const char *python_function_name,
136 void *session_dictionary,
137 const lldb::ValueObjectSP& valobj_sp,
138 void** pyfunct_wrapper,
139 const lldb::TypeSummaryOptionsSP& options_sp,
140 std::string& retval);
141
142extern "C" void*
143LLDBSwigPythonCreateSyntheticProvider (const char *python_class_name,
144 const char *session_dictionary_name,
145 const lldb::ValueObjectSP& valobj_sp);
146
147extern "C" void*
148LLDBSwigPythonCreateCommandObject (const char *python_class_name,
149 const char *session_dictionary_name,
150 const lldb::DebuggerSP debugger_sp);
151
152extern "C" void*
153LLDBSwigPythonCreateScriptedThreadPlan (const char *python_class_name,
154 const char *session_dictionary_name,
155 const lldb::ThreadPlanSP& thread_plan_sp);
156
157extern "C" bool
158LLDBSWIGPythonCallThreadPlan (void *implementor,
159 const char *method_name,
160 Event *event_sp,
161 bool &got_error);
162
163extern "C" size_t
Siva Chandra9ac7a6c2015-10-21 19:28:08 +0000164LLDBSwigPython_CalculateNumChildren (void *implementor, uint32_t max);
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000165
166extern "C" void *
167LLDBSwigPython_GetChildAtIndex (void *implementor, uint32_t idx);
168
169extern "C" int
170LLDBSwigPython_GetIndexOfChildWithName (void *implementor, const char* child_name);
171
172extern "C" void *
173LLDBSWIGPython_CastPyObjectToSBValue (void* data);
174
175extern lldb::ValueObjectSP
176LLDBSWIGPython_GetValueObjectSPFromSBValue (void* data);
177
178extern "C" bool
179LLDBSwigPython_UpdateSynthProviderInstance (void* implementor);
180
181extern "C" bool
182LLDBSwigPython_MightHaveChildrenSynthProviderInstance (void* implementor);
183
184extern "C" void *
185LLDBSwigPython_GetValueSynthProviderInstance (void* implementor);
186
187extern "C" bool
188LLDBSwigPythonCallCommand (const char *python_function_name,
189 const char *session_dictionary_name,
190 lldb::DebuggerSP& debugger,
191 const char* args,
192 lldb_private::CommandReturnObject &cmd_retobj,
193 lldb::ExecutionContextRefSP exe_ctx_ref_sp);
194
195extern "C" bool
196LLDBSwigPythonCallCommandObject (void *implementor,
197 lldb::DebuggerSP& debugger,
198 const char* args,
199 lldb_private::CommandReturnObject& cmd_retobj,
200 lldb::ExecutionContextRefSP exe_ctx_ref_sp);
201
202extern "C" bool
203LLDBSwigPythonCallModuleInit (const char *python_module_name,
204 const char *session_dictionary_name,
205 lldb::DebuggerSP& debugger);
206
207extern "C" void*
208LLDBSWIGPythonCreateOSPlugin (const char *python_class_name,
209 const char *session_dictionary_name,
210 const lldb::ProcessSP& process_sp);
211
212extern "C" bool
213LLDBSWIGPythonRunScriptKeywordProcess (const char* python_function_name,
214 const char* session_dictionary_name,
215 lldb::ProcessSP& process,
216 std::string& output);
217
218extern "C" bool
219LLDBSWIGPythonRunScriptKeywordThread (const char* python_function_name,
220 const char* session_dictionary_name,
221 lldb::ThreadSP& thread,
222 std::string& output);
223
224extern "C" bool
225LLDBSWIGPythonRunScriptKeywordTarget (const char* python_function_name,
226 const char* session_dictionary_name,
227 lldb::TargetSP& target,
228 std::string& output);
229
230extern "C" bool
231LLDBSWIGPythonRunScriptKeywordFrame (const char* python_function_name,
232 const char* session_dictionary_name,
233 lldb::StackFrameSP& frame,
234 std::string& output);
235
236extern "C" bool
237LLDBSWIGPythonRunScriptKeywordValue (const char* python_function_name,
238 const char* session_dictionary_name,
239 lldb::ValueObjectSP& value,
240 std::string& output);
241
242extern "C" void*
243LLDBSWIGPython_GetDynamicSetting (void* module,
244 const char* setting,
245 const lldb::TargetSP& target_sp);
246
247
248#endif
249
250SystemInitializerFull::SystemInitializerFull()
251{
252}
253
254SystemInitializerFull::~SystemInitializerFull()
255{
256}
257
258void
259SystemInitializerFull::Initialize()
260{
Zachary Turner2c1f46d2015-07-30 20:28:07 +0000261 SystemInitializerCommon::Initialize();
Keno Fischer6e776772015-08-23 09:05:29 +0000262 ScriptInterpreterNone::Initialize();
Zachary Turner2c1f46d2015-07-30 20:28:07 +0000263
Pavel Labatha7760cb2016-03-16 08:48:56 +0000264#ifndef LLDB_DISABLE_PYTHON
265 OperatingSystemPython::Initialize();
266#endif
267 OperatingSystemGo::Initialize();
268
Zachary Turner2c1f46d2015-07-30 20:28:07 +0000269#if !defined(LLDB_DISABLE_PYTHON)
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000270 InitializeSWIG();
271
Zachary Turner2c1f46d2015-07-30 20:28:07 +0000272 // ScriptInterpreterPython::Initialize() depends on things like HostInfo being initialized
273 // so it can compute the python directory etc, so we need to do this after
274 // SystemInitializerCommon::Initialize().
Zachary Turner2c1f46d2015-07-30 20:28:07 +0000275 ScriptInterpreterPython::Initialize();
276#endif
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000277
278 // Initialize LLVM and Clang
279 llvm::InitializeAllTargets();
280 llvm::InitializeAllAsmPrinters();
281 llvm::InitializeAllTargetMCs();
282 llvm::InitializeAllDisassemblers();
283
Greg Clayton56939cb2015-09-17 22:23:34 +0000284 ClangASTContext::Initialize();
285 GoASTContext::Initialize();
Tamas Berghammer87a97692016-02-26 14:21:23 +0000286 JavaASTContext::Initialize();
Greg Clayton56939cb2015-09-17 22:23:34 +0000287
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000288 ABIMacOSX_i386::Initialize();
289 ABIMacOSX_arm::Initialize();
290 ABIMacOSX_arm64::Initialize();
Omair Javaid52f825b2015-04-29 10:49:45 +0000291 ABISysV_arm::Initialize();
Omair Javaidb78e05f2015-04-29 11:52:35 +0000292 ABISysV_arm64::Initialize();
Ted Woodwardbff0a212015-12-10 17:53:07 +0000293 ABISysV_hexagon::Initialize();
Greg Claytonb289cba2015-06-25 17:50:15 +0000294 ABISysV_i386::Initialize();
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000295 ABISysV_x86_64::Initialize();
296 ABISysV_ppc::Initialize();
297 ABISysV_ppc64::Initialize();
Bhushan D. Attardea8219f22015-06-18 07:02:10 +0000298 ABISysV_mips::Initialize();
Bhushan D. Attarde13f54252015-06-19 04:25:07 +0000299 ABISysV_mips64::Initialize();
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000300 DisassemblerLLVMC::Initialize();
301
302 JITLoaderGDB::Initialize();
303 ProcessElfCore::Initialize();
Adrian McCarthyc96516f2015-08-03 23:01:51 +0000304#if defined(_MSC_VER)
305 ProcessWinMiniDump::Initialize();
306#endif
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000307 MemoryHistoryASan::Initialize();
308 AddressSanitizerRuntime::Initialize();
309
310 SymbolVendorELF::Initialize();
311 SymbolFileDWARF::Initialize();
Zachary Turner74e08ca2016-03-02 22:05:52 +0000312 SymbolFilePDB::Initialize();
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000313 SymbolFileSymtab::Initialize();
314 UnwindAssemblyInstEmulation::Initialize();
315 UnwindAssembly_x86::Initialize();
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000316 EmulateInstructionARM64::Initialize();
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000317 SymbolFileDWARFDebugMap::Initialize();
318 ItaniumABILanguageRuntime::Initialize();
319 AppleObjCRuntimeV2::Initialize();
320 AppleObjCRuntimeV1::Initialize();
321 SystemRuntimeMacOSX::Initialize();
Colin Riley5ec532a2015-04-09 16:49:25 +0000322 RenderScriptRuntime::Initialize();
Ryan Brown07a1c452015-10-06 20:29:31 +0000323 GoLanguageRuntime::Initialize();
Tamas Berghammer87a97692016-02-26 14:21:23 +0000324 JavaLanguageRuntime::Initialize();
Ed Maste81b4c5f2016-01-04 01:43:47 +0000325
Enrico Granata980c0482015-09-01 18:22:39 +0000326 CPlusPlusLanguage::Initialize();
Ryan Brown2dd84882015-11-05 00:24:36 +0000327 GoLanguage::Initialize();
Tamas Berghammer87a97692016-02-26 14:21:23 +0000328 JavaLanguage::Initialize();
Enrico Granata980c0482015-09-01 18:22:39 +0000329 ObjCLanguage::Initialize();
330 ObjCPlusPlusLanguage::Initialize();
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000331
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000332#if defined(_MSC_VER)
Adrian McCarthy18a9135d2015-10-28 18:21:45 +0000333 ProcessWindowsLive::Initialize();
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000334#endif
335#if defined(__FreeBSD__)
336 ProcessFreeBSD::Initialize();
337#endif
338#if defined(__APPLE__)
339 SymbolVendorMacOSX::Initialize();
340 ProcessKDP::Initialize();
341 ProcessMachCore::Initialize();
Jason Molenda5e88be92015-11-06 00:22:53 +0000342 PlatformAppleTVSimulator::Initialize();
343 PlatformAppleWatchSimulator::Initialize();
344 PlatformRemoteAppleTV::Initialize();
345 PlatformRemoteAppleWatch::Initialize();
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000346#endif
347 //----------------------------------------------------------------------
348 // Platform agnostic plugins
349 //----------------------------------------------------------------------
350 platform_gdb_server::PlatformRemoteGDBServer::Initialize();
351
352 process_gdb_remote::ProcessGDBRemote::Initialize();
353 DynamicLoaderStatic::Initialize();
354
355 // Scan for any system or user LLDB plug-ins
356 PluginManager::Initialize();
357
358 // The process settings need to know about installed plug-ins, so the Settings must be initialized
359 // AFTER PluginManager::Initialize is called.
360
361 Debugger::SettingsInitialize();
362}
363
364void SystemInitializerFull::InitializeSWIG()
365{
366#if !defined(LLDB_DISABLE_PYTHON)
367 ScriptInterpreterPython::InitializeInterpreter(
Zachary Turnerc5b41d62015-10-16 17:52:03 +0000368 LLDBSwigPyInit,
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000369 LLDBSwigPythonBreakpointCallbackFunction,
370 LLDBSwigPythonWatchpointCallbackFunction,
371 LLDBSwigPythonCallTypeScript,
372 LLDBSwigPythonCreateSyntheticProvider,
373 LLDBSwigPythonCreateCommandObject,
374 LLDBSwigPython_CalculateNumChildren,
375 LLDBSwigPython_GetChildAtIndex,
376 LLDBSwigPython_GetIndexOfChildWithName,
377 LLDBSWIGPython_CastPyObjectToSBValue,
378 LLDBSWIGPython_GetValueObjectSPFromSBValue,
379 LLDBSwigPython_UpdateSynthProviderInstance,
380 LLDBSwigPython_MightHaveChildrenSynthProviderInstance,
381 LLDBSwigPython_GetValueSynthProviderInstance,
382 LLDBSwigPythonCallCommand,
383 LLDBSwigPythonCallCommandObject,
384 LLDBSwigPythonCallModuleInit,
385 LLDBSWIGPythonCreateOSPlugin,
386 LLDBSWIGPythonRunScriptKeywordProcess,
387 LLDBSWIGPythonRunScriptKeywordThread,
388 LLDBSWIGPythonRunScriptKeywordTarget,
389 LLDBSWIGPythonRunScriptKeywordFrame,
390 LLDBSWIGPythonRunScriptKeywordValue,
391 LLDBSWIGPython_GetDynamicSetting,
392 LLDBSwigPythonCreateScriptedThreadPlan,
393 LLDBSWIGPythonCallThreadPlan);
394#endif
395}
396
397void
398SystemInitializerFull::Terminate()
399{
400 Timer scoped_timer(__PRETTY_FUNCTION__, __PRETTY_FUNCTION__);
401
402 Debugger::SettingsTerminate();
403
404 // Terminate and unload and loaded system or user LLDB plug-ins
405 PluginManager::Terminate();
Greg Clayton56939cb2015-09-17 22:23:34 +0000406
407 ClangASTContext::Terminate();
408 GoASTContext::Terminate();
Tamas Berghammer87a97692016-02-26 14:21:23 +0000409 JavaASTContext::Terminate();
Greg Clayton56939cb2015-09-17 22:23:34 +0000410
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000411 ABIMacOSX_i386::Terminate();
412 ABIMacOSX_arm::Terminate();
413 ABIMacOSX_arm64::Terminate();
Omair Javaid52f825b2015-04-29 10:49:45 +0000414 ABISysV_arm::Terminate();
Omair Javaidb78e05f2015-04-29 11:52:35 +0000415 ABISysV_arm64::Terminate();
Ted Woodwardbff0a212015-12-10 17:53:07 +0000416 ABISysV_hexagon::Terminate();
Greg Claytonb289cba2015-06-25 17:50:15 +0000417 ABISysV_i386::Terminate();
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000418 ABISysV_x86_64::Terminate();
419 ABISysV_ppc::Terminate();
420 ABISysV_ppc64::Terminate();
Bhushan D. Attardea8219f22015-06-18 07:02:10 +0000421 ABISysV_mips::Terminate();
Bhushan D. Attarde13f54252015-06-19 04:25:07 +0000422 ABISysV_mips64::Terminate();
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000423 DisassemblerLLVMC::Terminate();
424
425 JITLoaderGDB::Terminate();
426 ProcessElfCore::Terminate();
Adrian McCarthyc96516f2015-08-03 23:01:51 +0000427#if defined(_MSC_VER)
428 ProcessWinMiniDump::Terminate();
429#endif
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000430 MemoryHistoryASan::Terminate();
431 AddressSanitizerRuntime::Terminate();
432 SymbolVendorELF::Terminate();
433 SymbolFileDWARF::Terminate();
Zachary Turner74e08ca2016-03-02 22:05:52 +0000434 SymbolFilePDB::Terminate();
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000435 SymbolFileSymtab::Terminate();
436 UnwindAssembly_x86::Terminate();
437 UnwindAssemblyInstEmulation::Terminate();
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000438 EmulateInstructionARM64::Terminate();
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000439 SymbolFileDWARFDebugMap::Terminate();
440 ItaniumABILanguageRuntime::Terminate();
441 AppleObjCRuntimeV2::Terminate();
442 AppleObjCRuntimeV1::Terminate();
443 SystemRuntimeMacOSX::Terminate();
Colin Riley5ec532a2015-04-09 16:49:25 +0000444 RenderScriptRuntime::Terminate();
Tamas Berghammer87a97692016-02-26 14:21:23 +0000445 JavaLanguageRuntime::Terminate();
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000446
Enrico Granata980c0482015-09-01 18:22:39 +0000447 CPlusPlusLanguage::Terminate();
Ryan Brown2dd84882015-11-05 00:24:36 +0000448 GoLanguage::Terminate();
Tamas Berghammer87a97692016-02-26 14:21:23 +0000449 JavaLanguage::Terminate();
Enrico Granata980c0482015-09-01 18:22:39 +0000450 ObjCLanguage::Terminate();
451 ObjCPlusPlusLanguage::Terminate();
Ed Maste81b4c5f2016-01-04 01:43:47 +0000452
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000453#if defined(__APPLE__)
454 ProcessMachCore::Terminate();
455 ProcessKDP::Terminate();
456 SymbolVendorMacOSX::Terminate();
Jason Molenda5e88be92015-11-06 00:22:53 +0000457 PlatformAppleTVSimulator::Terminate();
458 PlatformAppleWatchSimulator::Terminate();
459 PlatformRemoteAppleTV::Terminate();
460 PlatformRemoteAppleWatch::Terminate();
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000461#endif
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000462
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000463#if defined(__FreeBSD__)
464 ProcessFreeBSD::Terminate();
465#endif
466 Debugger::SettingsTerminate();
467
468 platform_gdb_server::PlatformRemoteGDBServer::Terminate();
469 process_gdb_remote::ProcessGDBRemote::Terminate();
470 DynamicLoaderStatic::Terminate();
471
Pavel Labatha7760cb2016-03-16 08:48:56 +0000472#ifndef LLDB_DISABLE_PYTHON
473 OperatingSystemPython::Terminate();
474#endif
475 OperatingSystemGo::Terminate();
476
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000477 // Now shutdown the common parts, in reverse order.
478 SystemInitializerCommon::Terminate();
479}