blob: 4d44834631356c07d64e43a4f95d3211dc815e0f [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"
Kuba Brecka6a831432016-03-23 15:36:22 +000047#include "Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.h"
Zachary Turnere6e2bb32015-03-31 21:03:22 +000048#include "Plugins/JITLoader/GDB/JITLoaderGDB.h"
Enrico Granata980c0482015-09-01 18:22:39 +000049#include "Plugins/Language/CPlusPlus/CPlusPlusLanguage.h"
Ryan Brown2dd84882015-11-05 00:24:36 +000050#include "Plugins/Language/Go/GoLanguage.h"
Tamas Berghammer87a97692016-02-26 14:21:23 +000051#include "Plugins/Language/Java/JavaLanguage.h"
Enrico Granata980c0482015-09-01 18:22:39 +000052#include "Plugins/Language/ObjC/ObjCLanguage.h"
53#include "Plugins/Language/ObjCPlusPlus/ObjCPlusPlusLanguage.h"
Zachary Turnere6e2bb32015-03-31 21:03:22 +000054#include "Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h"
Ryan Brown07a1c452015-10-06 20:29:31 +000055#include "Plugins/LanguageRuntime/Go/GoLanguageRuntime.h"
Tamas Berghammer87a97692016-02-26 14:21:23 +000056#include "Plugins/LanguageRuntime/Java/JavaLanguageRuntime.h"
Zachary Turner74e08ca2016-03-02 22:05:52 +000057#include "Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h"
58#include "Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h"
Colin Riley5ec532a2015-04-09 16:49:25 +000059#include "Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h"
Zachary Turnere6e2bb32015-03-31 21:03:22 +000060#include "Plugins/MemoryHistory/asan/MemoryHistoryASan.h"
Pavel Labatha7760cb2016-03-16 08:48:56 +000061#include "Plugins/OperatingSystem/Python/OperatingSystemPython.h"
62#include "Plugins/OperatingSystem/Go/OperatingSystemGo.h"
Zachary Turnere6e2bb32015-03-31 21:03:22 +000063#include "Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h"
64#include "Plugins/Process/elf-core/ProcessElfCore.h"
65#include "Plugins/Process/gdb-remote/ProcessGDBRemote.h"
Zachary Turner2c1f46d2015-07-30 20:28:07 +000066#include "Plugins/ScriptInterpreter/None/ScriptInterpreterNone.h"
Zachary Turnere6e2bb32015-03-31 21:03:22 +000067#include "Plugins/SymbolFile/DWARF/SymbolFileDWARF.h"
68#include "Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h"
Zachary Turner74e08ca2016-03-02 22:05:52 +000069#include "Plugins/SymbolFile/PDB/SymbolFilePDB.h"
Zachary Turnere6e2bb32015-03-31 21:03:22 +000070#include "Plugins/SymbolFile/Symtab/SymbolFileSymtab.h"
71#include "Plugins/SymbolVendor/ELF/SymbolVendorELF.h"
72#include "Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.h"
Zachary Turnere6e2bb32015-03-31 21:03:22 +000073#include "Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h"
Zachary Turner74e08ca2016-03-02 22:05:52 +000074#include "Plugins/UnwindAssembly/x86/UnwindAssembly-x86.h"
Zachary Turnere6e2bb32015-03-31 21:03:22 +000075
76#if defined(__APPLE__)
77#include "Plugins/Process/mach-core/ProcessMachCore.h"
78#include "Plugins/Process/MacOSX-Kernel/ProcessKDP.h"
79#include "Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.h"
Jason Molenda5e88be92015-11-06 00:22:53 +000080#include "Plugins/Platform/MacOSX/PlatformAppleTVSimulator.h"
81#include "Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.h"
82#include "Plugins/Platform/MacOSX/PlatformRemoteAppleTV.h"
83#include "Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.h"
Zachary Turnere6e2bb32015-03-31 21:03:22 +000084#endif
85
86#if defined(__FreeBSD__)
87#include "Plugins/Process/FreeBSD/ProcessFreeBSD.h"
88#endif
89
Zachary Turnere6e2bb32015-03-31 21:03:22 +000090#if defined(_MSC_VER)
91#include "lldb/Host/windows/windows.h"
Adrian McCarthy18a9135d2015-10-28 18:21:45 +000092#include "Plugins/Process/Windows/Live/ProcessWindowsLive.h"
Adrian McCarthy27785dd2015-08-24 16:00:51 +000093#include "Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.h"
Zachary Turnere6e2bb32015-03-31 21:03:22 +000094#endif
95
Zachary Turnere6e2bb32015-03-31 21:03:22 +000096#include "llvm/Support/TargetSelect.h"
97
98#include <string>
99
100using namespace lldb_private;
101
102#ifndef LLDB_DISABLE_PYTHON
103
104// Defined in the SWIG source file
Zachary Turnerc5b41d62015-10-16 17:52:03 +0000105#if PY_MAJOR_VERSION >= 3
106extern "C" PyObject*
107PyInit__lldb(void);
108
109#define LLDBSwigPyInit PyInit__lldb
110
111#else
Ed Maste81b4c5f2016-01-04 01:43:47 +0000112extern "C" void
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000113init_lldb(void);
114
Zachary Turnerc5b41d62015-10-16 17:52:03 +0000115#define LLDBSwigPyInit init_lldb
116#endif
117
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000118// these are the Pythonic implementations of the required callbacks
119// these are scripting-language specific, which is why they belong here
120// we still need to use function pointers to them instead of relying
121// on linkage-time resolution because the SWIG stuff and this file
122// get built at different times
123extern "C" bool
124LLDBSwigPythonBreakpointCallbackFunction (const char *python_function_name,
125 const char *session_dictionary_name,
126 const lldb::StackFrameSP& sb_frame,
127 const lldb::BreakpointLocationSP& sb_bp_loc);
128
129extern "C" bool
130LLDBSwigPythonWatchpointCallbackFunction (const char *python_function_name,
131 const char *session_dictionary_name,
132 const lldb::StackFrameSP& sb_frame,
133 const lldb::WatchpointSP& sb_wp);
134
135extern "C" bool
136LLDBSwigPythonCallTypeScript (const char *python_function_name,
137 void *session_dictionary,
138 const lldb::ValueObjectSP& valobj_sp,
139 void** pyfunct_wrapper,
140 const lldb::TypeSummaryOptionsSP& options_sp,
141 std::string& retval);
142
143extern "C" void*
144LLDBSwigPythonCreateSyntheticProvider (const char *python_class_name,
145 const char *session_dictionary_name,
146 const lldb::ValueObjectSP& valobj_sp);
147
148extern "C" void*
149LLDBSwigPythonCreateCommandObject (const char *python_class_name,
150 const char *session_dictionary_name,
151 const lldb::DebuggerSP debugger_sp);
152
153extern "C" void*
154LLDBSwigPythonCreateScriptedThreadPlan (const char *python_class_name,
155 const char *session_dictionary_name,
156 const lldb::ThreadPlanSP& thread_plan_sp);
157
158extern "C" bool
159LLDBSWIGPythonCallThreadPlan (void *implementor,
160 const char *method_name,
161 Event *event_sp,
162 bool &got_error);
163
164extern "C" size_t
Siva Chandra9ac7a6c2015-10-21 19:28:08 +0000165LLDBSwigPython_CalculateNumChildren (void *implementor, uint32_t max);
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000166
167extern "C" void *
168LLDBSwigPython_GetChildAtIndex (void *implementor, uint32_t idx);
169
170extern "C" int
171LLDBSwigPython_GetIndexOfChildWithName (void *implementor, const char* child_name);
172
173extern "C" void *
174LLDBSWIGPython_CastPyObjectToSBValue (void* data);
175
176extern lldb::ValueObjectSP
177LLDBSWIGPython_GetValueObjectSPFromSBValue (void* data);
178
179extern "C" bool
180LLDBSwigPython_UpdateSynthProviderInstance (void* implementor);
181
182extern "C" bool
183LLDBSwigPython_MightHaveChildrenSynthProviderInstance (void* implementor);
184
185extern "C" void *
186LLDBSwigPython_GetValueSynthProviderInstance (void* implementor);
187
188extern "C" bool
189LLDBSwigPythonCallCommand (const char *python_function_name,
190 const char *session_dictionary_name,
191 lldb::DebuggerSP& debugger,
192 const char* args,
193 lldb_private::CommandReturnObject &cmd_retobj,
194 lldb::ExecutionContextRefSP exe_ctx_ref_sp);
195
196extern "C" bool
197LLDBSwigPythonCallCommandObject (void *implementor,
198 lldb::DebuggerSP& debugger,
199 const char* args,
200 lldb_private::CommandReturnObject& cmd_retobj,
201 lldb::ExecutionContextRefSP exe_ctx_ref_sp);
202
203extern "C" bool
204LLDBSwigPythonCallModuleInit (const char *python_module_name,
205 const char *session_dictionary_name,
206 lldb::DebuggerSP& debugger);
207
208extern "C" void*
209LLDBSWIGPythonCreateOSPlugin (const char *python_class_name,
210 const char *session_dictionary_name,
211 const lldb::ProcessSP& process_sp);
212
213extern "C" bool
214LLDBSWIGPythonRunScriptKeywordProcess (const char* python_function_name,
215 const char* session_dictionary_name,
216 lldb::ProcessSP& process,
217 std::string& output);
218
219extern "C" bool
220LLDBSWIGPythonRunScriptKeywordThread (const char* python_function_name,
221 const char* session_dictionary_name,
222 lldb::ThreadSP& thread,
223 std::string& output);
224
225extern "C" bool
226LLDBSWIGPythonRunScriptKeywordTarget (const char* python_function_name,
227 const char* session_dictionary_name,
228 lldb::TargetSP& target,
229 std::string& output);
230
231extern "C" bool
232LLDBSWIGPythonRunScriptKeywordFrame (const char* python_function_name,
233 const char* session_dictionary_name,
234 lldb::StackFrameSP& frame,
235 std::string& output);
236
237extern "C" bool
238LLDBSWIGPythonRunScriptKeywordValue (const char* python_function_name,
239 const char* session_dictionary_name,
240 lldb::ValueObjectSP& value,
241 std::string& output);
242
243extern "C" void*
244LLDBSWIGPython_GetDynamicSetting (void* module,
245 const char* setting,
246 const lldb::TargetSP& target_sp);
247
248
249#endif
250
251SystemInitializerFull::SystemInitializerFull()
252{
253}
254
255SystemInitializerFull::~SystemInitializerFull()
256{
257}
258
259void
260SystemInitializerFull::Initialize()
261{
Zachary Turner2c1f46d2015-07-30 20:28:07 +0000262 SystemInitializerCommon::Initialize();
Keno Fischer6e776772015-08-23 09:05:29 +0000263 ScriptInterpreterNone::Initialize();
Zachary Turner2c1f46d2015-07-30 20:28:07 +0000264
Pavel Labatha7760cb2016-03-16 08:48:56 +0000265#ifndef LLDB_DISABLE_PYTHON
266 OperatingSystemPython::Initialize();
267#endif
268 OperatingSystemGo::Initialize();
269
Zachary Turner2c1f46d2015-07-30 20:28:07 +0000270#if !defined(LLDB_DISABLE_PYTHON)
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000271 InitializeSWIG();
272
Zachary Turner2c1f46d2015-07-30 20:28:07 +0000273 // ScriptInterpreterPython::Initialize() depends on things like HostInfo being initialized
274 // so it can compute the python directory etc, so we need to do this after
275 // SystemInitializerCommon::Initialize().
Zachary Turner2c1f46d2015-07-30 20:28:07 +0000276 ScriptInterpreterPython::Initialize();
277#endif
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000278
279 // Initialize LLVM and Clang
280 llvm::InitializeAllTargets();
281 llvm::InitializeAllAsmPrinters();
282 llvm::InitializeAllTargetMCs();
283 llvm::InitializeAllDisassemblers();
284
Greg Clayton56939cb2015-09-17 22:23:34 +0000285 ClangASTContext::Initialize();
286 GoASTContext::Initialize();
Tamas Berghammer87a97692016-02-26 14:21:23 +0000287 JavaASTContext::Initialize();
Greg Clayton56939cb2015-09-17 22:23:34 +0000288
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000289 ABIMacOSX_i386::Initialize();
290 ABIMacOSX_arm::Initialize();
291 ABIMacOSX_arm64::Initialize();
Omair Javaid52f825b2015-04-29 10:49:45 +0000292 ABISysV_arm::Initialize();
Omair Javaidb78e05f2015-04-29 11:52:35 +0000293 ABISysV_arm64::Initialize();
Ted Woodwardbff0a212015-12-10 17:53:07 +0000294 ABISysV_hexagon::Initialize();
Greg Claytonb289cba2015-06-25 17:50:15 +0000295 ABISysV_i386::Initialize();
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000296 ABISysV_x86_64::Initialize();
297 ABISysV_ppc::Initialize();
298 ABISysV_ppc64::Initialize();
Bhushan D. Attardea8219f22015-06-18 07:02:10 +0000299 ABISysV_mips::Initialize();
Bhushan D. Attarde13f54252015-06-19 04:25:07 +0000300 ABISysV_mips64::Initialize();
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000301 DisassemblerLLVMC::Initialize();
302
303 JITLoaderGDB::Initialize();
304 ProcessElfCore::Initialize();
Adrian McCarthyc96516f2015-08-03 23:01:51 +0000305#if defined(_MSC_VER)
306 ProcessWinMiniDump::Initialize();
307#endif
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000308 MemoryHistoryASan::Initialize();
309 AddressSanitizerRuntime::Initialize();
Kuba Brecka6a831432016-03-23 15:36:22 +0000310 ThreadSanitizerRuntime::Initialize();
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000311
312 SymbolVendorELF::Initialize();
313 SymbolFileDWARF::Initialize();
Zachary Turner74e08ca2016-03-02 22:05:52 +0000314 SymbolFilePDB::Initialize();
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000315 SymbolFileSymtab::Initialize();
316 UnwindAssemblyInstEmulation::Initialize();
317 UnwindAssembly_x86::Initialize();
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000318 EmulateInstructionARM64::Initialize();
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000319 SymbolFileDWARFDebugMap::Initialize();
320 ItaniumABILanguageRuntime::Initialize();
321 AppleObjCRuntimeV2::Initialize();
322 AppleObjCRuntimeV1::Initialize();
323 SystemRuntimeMacOSX::Initialize();
Colin Riley5ec532a2015-04-09 16:49:25 +0000324 RenderScriptRuntime::Initialize();
Ryan Brown07a1c452015-10-06 20:29:31 +0000325 GoLanguageRuntime::Initialize();
Tamas Berghammer87a97692016-02-26 14:21:23 +0000326 JavaLanguageRuntime::Initialize();
Ed Maste81b4c5f2016-01-04 01:43:47 +0000327
Enrico Granata980c0482015-09-01 18:22:39 +0000328 CPlusPlusLanguage::Initialize();
Ryan Brown2dd84882015-11-05 00:24:36 +0000329 GoLanguage::Initialize();
Tamas Berghammer87a97692016-02-26 14:21:23 +0000330 JavaLanguage::Initialize();
Enrico Granata980c0482015-09-01 18:22:39 +0000331 ObjCLanguage::Initialize();
332 ObjCPlusPlusLanguage::Initialize();
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000333
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000334#if defined(_MSC_VER)
Adrian McCarthy18a9135d2015-10-28 18:21:45 +0000335 ProcessWindowsLive::Initialize();
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000336#endif
337#if defined(__FreeBSD__)
338 ProcessFreeBSD::Initialize();
339#endif
340#if defined(__APPLE__)
341 SymbolVendorMacOSX::Initialize();
342 ProcessKDP::Initialize();
343 ProcessMachCore::Initialize();
Jason Molenda5e88be92015-11-06 00:22:53 +0000344 PlatformAppleTVSimulator::Initialize();
345 PlatformAppleWatchSimulator::Initialize();
346 PlatformRemoteAppleTV::Initialize();
347 PlatformRemoteAppleWatch::Initialize();
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000348#endif
349 //----------------------------------------------------------------------
350 // Platform agnostic plugins
351 //----------------------------------------------------------------------
352 platform_gdb_server::PlatformRemoteGDBServer::Initialize();
353
354 process_gdb_remote::ProcessGDBRemote::Initialize();
355 DynamicLoaderStatic::Initialize();
356
357 // Scan for any system or user LLDB plug-ins
358 PluginManager::Initialize();
359
360 // The process settings need to know about installed plug-ins, so the Settings must be initialized
361 // AFTER PluginManager::Initialize is called.
362
363 Debugger::SettingsInitialize();
364}
365
366void SystemInitializerFull::InitializeSWIG()
367{
368#if !defined(LLDB_DISABLE_PYTHON)
369 ScriptInterpreterPython::InitializeInterpreter(
Zachary Turnerc5b41d62015-10-16 17:52:03 +0000370 LLDBSwigPyInit,
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000371 LLDBSwigPythonBreakpointCallbackFunction,
372 LLDBSwigPythonWatchpointCallbackFunction,
373 LLDBSwigPythonCallTypeScript,
374 LLDBSwigPythonCreateSyntheticProvider,
375 LLDBSwigPythonCreateCommandObject,
376 LLDBSwigPython_CalculateNumChildren,
377 LLDBSwigPython_GetChildAtIndex,
378 LLDBSwigPython_GetIndexOfChildWithName,
379 LLDBSWIGPython_CastPyObjectToSBValue,
380 LLDBSWIGPython_GetValueObjectSPFromSBValue,
381 LLDBSwigPython_UpdateSynthProviderInstance,
382 LLDBSwigPython_MightHaveChildrenSynthProviderInstance,
383 LLDBSwigPython_GetValueSynthProviderInstance,
384 LLDBSwigPythonCallCommand,
385 LLDBSwigPythonCallCommandObject,
386 LLDBSwigPythonCallModuleInit,
387 LLDBSWIGPythonCreateOSPlugin,
388 LLDBSWIGPythonRunScriptKeywordProcess,
389 LLDBSWIGPythonRunScriptKeywordThread,
390 LLDBSWIGPythonRunScriptKeywordTarget,
391 LLDBSWIGPythonRunScriptKeywordFrame,
392 LLDBSWIGPythonRunScriptKeywordValue,
393 LLDBSWIGPython_GetDynamicSetting,
394 LLDBSwigPythonCreateScriptedThreadPlan,
395 LLDBSWIGPythonCallThreadPlan);
396#endif
397}
398
399void
400SystemInitializerFull::Terminate()
401{
402 Timer scoped_timer(__PRETTY_FUNCTION__, __PRETTY_FUNCTION__);
403
404 Debugger::SettingsTerminate();
405
406 // Terminate and unload and loaded system or user LLDB plug-ins
407 PluginManager::Terminate();
Greg Clayton56939cb2015-09-17 22:23:34 +0000408
409 ClangASTContext::Terminate();
410 GoASTContext::Terminate();
Tamas Berghammer87a97692016-02-26 14:21:23 +0000411 JavaASTContext::Terminate();
Greg Clayton56939cb2015-09-17 22:23:34 +0000412
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000413 ABIMacOSX_i386::Terminate();
414 ABIMacOSX_arm::Terminate();
415 ABIMacOSX_arm64::Terminate();
Omair Javaid52f825b2015-04-29 10:49:45 +0000416 ABISysV_arm::Terminate();
Omair Javaidb78e05f2015-04-29 11:52:35 +0000417 ABISysV_arm64::Terminate();
Ted Woodwardbff0a212015-12-10 17:53:07 +0000418 ABISysV_hexagon::Terminate();
Greg Claytonb289cba2015-06-25 17:50:15 +0000419 ABISysV_i386::Terminate();
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000420 ABISysV_x86_64::Terminate();
421 ABISysV_ppc::Terminate();
422 ABISysV_ppc64::Terminate();
Bhushan D. Attardea8219f22015-06-18 07:02:10 +0000423 ABISysV_mips::Terminate();
Bhushan D. Attarde13f54252015-06-19 04:25:07 +0000424 ABISysV_mips64::Terminate();
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000425 DisassemblerLLVMC::Terminate();
426
427 JITLoaderGDB::Terminate();
428 ProcessElfCore::Terminate();
Adrian McCarthyc96516f2015-08-03 23:01:51 +0000429#if defined(_MSC_VER)
430 ProcessWinMiniDump::Terminate();
431#endif
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000432 MemoryHistoryASan::Terminate();
433 AddressSanitizerRuntime::Terminate();
Kuba Brecka6a831432016-03-23 15:36:22 +0000434 ThreadSanitizerRuntime::Terminate();
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000435 SymbolVendorELF::Terminate();
436 SymbolFileDWARF::Terminate();
Zachary Turner74e08ca2016-03-02 22:05:52 +0000437 SymbolFilePDB::Terminate();
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000438 SymbolFileSymtab::Terminate();
439 UnwindAssembly_x86::Terminate();
440 UnwindAssemblyInstEmulation::Terminate();
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000441 EmulateInstructionARM64::Terminate();
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000442 SymbolFileDWARFDebugMap::Terminate();
443 ItaniumABILanguageRuntime::Terminate();
444 AppleObjCRuntimeV2::Terminate();
445 AppleObjCRuntimeV1::Terminate();
446 SystemRuntimeMacOSX::Terminate();
Colin Riley5ec532a2015-04-09 16:49:25 +0000447 RenderScriptRuntime::Terminate();
Tamas Berghammer87a97692016-02-26 14:21:23 +0000448 JavaLanguageRuntime::Terminate();
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000449
Enrico Granata980c0482015-09-01 18:22:39 +0000450 CPlusPlusLanguage::Terminate();
Ryan Brown2dd84882015-11-05 00:24:36 +0000451 GoLanguage::Terminate();
Tamas Berghammer87a97692016-02-26 14:21:23 +0000452 JavaLanguage::Terminate();
Enrico Granata980c0482015-09-01 18:22:39 +0000453 ObjCLanguage::Terminate();
454 ObjCPlusPlusLanguage::Terminate();
Ed Maste81b4c5f2016-01-04 01:43:47 +0000455
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000456#if defined(__APPLE__)
457 ProcessMachCore::Terminate();
458 ProcessKDP::Terminate();
459 SymbolVendorMacOSX::Terminate();
Jason Molenda5e88be92015-11-06 00:22:53 +0000460 PlatformAppleTVSimulator::Terminate();
461 PlatformAppleWatchSimulator::Terminate();
462 PlatformRemoteAppleTV::Terminate();
463 PlatformRemoteAppleWatch::Terminate();
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000464#endif
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000465
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000466#if defined(__FreeBSD__)
467 ProcessFreeBSD::Terminate();
468#endif
469 Debugger::SettingsTerminate();
470
471 platform_gdb_server::PlatformRemoteGDBServer::Terminate();
472 process_gdb_remote::ProcessGDBRemote::Terminate();
473 DynamicLoaderStatic::Terminate();
474
Pavel Labatha7760cb2016-03-16 08:48:56 +0000475#ifndef LLDB_DISABLE_PYTHON
476 OperatingSystemPython::Terminate();
477#endif
478 OperatingSystemGo::Terminate();
479
Zachary Turnere6e2bb32015-03-31 21:03:22 +0000480 // Now shutdown the common parts, in reverse order.
481 SystemInitializerCommon::Terminate();
482}