Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 1 | //===-- 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 Turner | 2c1f46d | 2015-07-30 20:28:07 +0000 | [diff] [blame] | 10 | #if !defined(LLDB_DISABLE_PYTHON) |
| 11 | #include "Plugins/ScriptInterpreter/Python/lldb-python.h" |
| 12 | #endif |
| 13 | |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 14 | #include "lldb/API/SystemInitializerFull.h" |
| 15 | |
Zachary Turner | 2c1f46d | 2015-07-30 20:28:07 +0000 | [diff] [blame] | 16 | #include "lldb/API/SBCommandInterpreter.h" |
| 17 | |
| 18 | #if !defined(LLDB_DISABLE_PYTHON) |
| 19 | #include "Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h" |
| 20 | #endif |
| 21 | |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 22 | #include "lldb/Core/Debugger.h" |
| 23 | #include "lldb/Core/Timer.h" |
| 24 | #include "lldb/Host/Host.h" |
| 25 | #include "lldb/Initialization/SystemInitializerCommon.h" |
Zachary Turner | 2c1f46d | 2015-07-30 20:28:07 +0000 | [diff] [blame] | 26 | #include "lldb/Interpreter/CommandInterpreter.h" |
Greg Clayton | 56939cb | 2015-09-17 22:23:34 +0000 | [diff] [blame] | 27 | #include "lldb/Symbol/ClangASTContext.h" |
| 28 | #include "lldb/Symbol/GoASTContext.h" |
Tamas Berghammer | 87a9769 | 2016-02-26 14:21:23 +0000 | [diff] [blame] | 29 | #include "lldb/Symbol/JavaASTContext.h" |
Tamas Berghammer | 00adc41 | 2016-08-02 11:15:55 +0000 | [diff] [blame] | 30 | #include "lldb/Symbol/OCamlASTContext.h" |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 31 | |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 32 | #include "Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h" |
| 33 | #include "Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.h" |
Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 34 | #include "Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h" |
Omair Javaid | 52f825b | 2015-04-29 10:49:45 +0000 | [diff] [blame] | 35 | #include "Plugins/ABI/SysV-arm/ABISysV_arm.h" |
Omair Javaid | b78e05f | 2015-04-29 11:52:35 +0000 | [diff] [blame] | 36 | #include "Plugins/ABI/SysV-arm64/ABISysV_arm64.h" |
Ted Woodward | bff0a21 | 2015-12-10 17:53:07 +0000 | [diff] [blame] | 37 | #include "Plugins/ABI/SysV-hexagon/ABISysV_hexagon.h" |
Greg Clayton | b289cba | 2015-06-25 17:50:15 +0000 | [diff] [blame] | 38 | #include "Plugins/ABI/SysV-i386/ABISysV_i386.h" |
Bhushan D. Attarde | a8219f2 | 2015-06-18 07:02:10 +0000 | [diff] [blame] | 39 | #include "Plugins/ABI/SysV-mips/ABISysV_mips.h" |
Bhushan D. Attarde | 13f5425 | 2015-06-19 04:25:07 +0000 | [diff] [blame] | 40 | #include "Plugins/ABI/SysV-mips64/ABISysV_mips64.h" |
Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 41 | #include "Plugins/ABI/SysV-ppc/ABISysV_ppc.h" |
| 42 | #include "Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h" |
Ulrich Weigand | bb00d0b | 2016-04-14 14:28:34 +0000 | [diff] [blame] | 43 | #include "Plugins/ABI/SysV-s390x/ABISysV_s390x.h" |
Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 44 | #include "Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h" |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 45 | #include "Plugins/Disassembler/llvm/DisassemblerLLVMC.h" |
Jason Molenda | 9ab5dc2 | 2016-07-21 08:30:55 +0000 | [diff] [blame] | 46 | #include "Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.h" |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 47 | #include "Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h" |
Pavel Labath | 773c3b0 | 2016-03-29 15:00:26 +0000 | [diff] [blame] | 48 | #include "Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h" |
Pavel Labath | f176353 | 2016-06-29 13:58:27 +0000 | [diff] [blame] | 49 | #include "Plugins/DynamicLoader/Static/DynamicLoaderStatic.h" |
Pavel Labath | 773c3b0 | 2016-03-29 15:00:26 +0000 | [diff] [blame] | 50 | #include "Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.h" |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 51 | #include "Plugins/Instruction/ARM64/EmulateInstructionARM64.h" |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 52 | #include "Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.h" |
Kuba Brecka | 6a83143 | 2016-03-23 15:36:22 +0000 | [diff] [blame] | 53 | #include "Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.h" |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 54 | #include "Plugins/JITLoader/GDB/JITLoaderGDB.h" |
Enrico Granata | 980c048 | 2015-09-01 18:22:39 +0000 | [diff] [blame] | 55 | #include "Plugins/Language/CPlusPlus/CPlusPlusLanguage.h" |
Ryan Brown | 2dd8488 | 2015-11-05 00:24:36 +0000 | [diff] [blame] | 56 | #include "Plugins/Language/Go/GoLanguage.h" |
Tamas Berghammer | 87a9769 | 2016-02-26 14:21:23 +0000 | [diff] [blame] | 57 | #include "Plugins/Language/Java/JavaLanguage.h" |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 58 | #include "Plugins/Language/OCaml/OCamlLanguage.h" |
Enrico Granata | 980c048 | 2015-09-01 18:22:39 +0000 | [diff] [blame] | 59 | #include "Plugins/Language/ObjC/ObjCLanguage.h" |
| 60 | #include "Plugins/Language/ObjCPlusPlus/ObjCPlusPlusLanguage.h" |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 61 | #include "Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h" |
Ryan Brown | 07a1c45 | 2015-10-06 20:29:31 +0000 | [diff] [blame] | 62 | #include "Plugins/LanguageRuntime/Go/GoLanguageRuntime.h" |
Tamas Berghammer | 87a9769 | 2016-02-26 14:21:23 +0000 | [diff] [blame] | 63 | #include "Plugins/LanguageRuntime/Java/JavaLanguageRuntime.h" |
Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 64 | #include "Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h" |
| 65 | #include "Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h" |
Colin Riley | 5ec532a | 2015-04-09 16:49:25 +0000 | [diff] [blame] | 66 | #include "Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h" |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 67 | #include "Plugins/MemoryHistory/asan/MemoryHistoryASan.h" |
Pavel Labath | a7760cb | 2016-03-16 08:48:56 +0000 | [diff] [blame] | 68 | #include "Plugins/OperatingSystem/Go/OperatingSystemGo.h" |
Pavel Labath | f176353 | 2016-06-29 13:58:27 +0000 | [diff] [blame] | 69 | #include "Plugins/OperatingSystem/Python/OperatingSystemPython.h" |
| 70 | #include "Plugins/Platform/Android/PlatformAndroid.h" |
| 71 | #include "Plugins/Platform/FreeBSD/PlatformFreeBSD.h" |
| 72 | #include "Plugins/Platform/Kalimba/PlatformKalimba.h" |
| 73 | #include "Plugins/Platform/Linux/PlatformLinux.h" |
| 74 | #include "Plugins/Platform/MacOSX/PlatformMacOSX.h" |
| 75 | #include "Plugins/Platform/MacOSX/PlatformRemoteiOS.h" |
| 76 | #include "Plugins/Platform/NetBSD/PlatformNetBSD.h" |
| 77 | #include "Plugins/Platform/Windows/PlatformWindows.h" |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 78 | #include "Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h" |
| 79 | #include "Plugins/Process/elf-core/ProcessElfCore.h" |
| 80 | #include "Plugins/Process/gdb-remote/ProcessGDBRemote.h" |
Zachary Turner | 2c1f46d | 2015-07-30 20:28:07 +0000 | [diff] [blame] | 81 | #include "Plugins/ScriptInterpreter/None/ScriptInterpreterNone.h" |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 82 | #include "Plugins/SymbolFile/DWARF/SymbolFileDWARF.h" |
| 83 | #include "Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h" |
Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 84 | #include "Plugins/SymbolFile/PDB/SymbolFilePDB.h" |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 85 | #include "Plugins/SymbolFile/Symtab/SymbolFileSymtab.h" |
| 86 | #include "Plugins/SymbolVendor/ELF/SymbolVendorELF.h" |
| 87 | #include "Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.h" |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 88 | #include "Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h" |
Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 89 | #include "Plugins/UnwindAssembly/x86/UnwindAssembly-x86.h" |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 90 | |
| 91 | #if defined(__APPLE__) |
Pavel Labath | f176353 | 2016-06-29 13:58:27 +0000 | [diff] [blame] | 92 | #include "Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h" |
Jason Molenda | 5e88be9 | 2015-11-06 00:22:53 +0000 | [diff] [blame] | 93 | #include "Plugins/Platform/MacOSX/PlatformAppleTVSimulator.h" |
| 94 | #include "Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.h" |
Pavel Labath | f176353 | 2016-06-29 13:58:27 +0000 | [diff] [blame] | 95 | #include "Plugins/Platform/MacOSX/PlatformDarwinKernel.h" |
Jason Molenda | 5e88be9 | 2015-11-06 00:22:53 +0000 | [diff] [blame] | 96 | #include "Plugins/Platform/MacOSX/PlatformRemoteAppleTV.h" |
| 97 | #include "Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.h" |
Pavel Labath | f176353 | 2016-06-29 13:58:27 +0000 | [diff] [blame] | 98 | #include "Plugins/Platform/MacOSX/PlatformiOSSimulator.h" |
| 99 | #include "Plugins/Process/MacOSX-Kernel/ProcessKDP.h" |
| 100 | #include "Plugins/Process/mach-core/ProcessMachCore.h" |
| 101 | #include "Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.h" |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 102 | #endif |
Todd Fiala | 7593001 | 2016-08-19 04:21:48 +0000 | [diff] [blame] | 103 | #include "Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.h" |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 104 | |
| 105 | #if defined(__FreeBSD__) |
| 106 | #include "Plugins/Process/FreeBSD/ProcessFreeBSD.h" |
| 107 | #endif |
| 108 | |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 109 | #if defined(_MSC_VER) |
Adrian McCarthy | 18a9135d | 2015-10-28 18:21:45 +0000 | [diff] [blame] | 110 | #include "Plugins/Process/Windows/Live/ProcessWindowsLive.h" |
Adrian McCarthy | 27785dd | 2015-08-24 16:00:51 +0000 | [diff] [blame] | 111 | #include "Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.h" |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 112 | #include "lldb/Host/windows/windows.h" |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 113 | #endif |
| 114 | |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 115 | #include "llvm/Support/TargetSelect.h" |
| 116 | |
| 117 | #include <string> |
| 118 | |
| 119 | using namespace lldb_private; |
| 120 | |
| 121 | #ifndef LLDB_DISABLE_PYTHON |
| 122 | |
| 123 | // Defined in the SWIG source file |
Zachary Turner | c5b41d6 | 2015-10-16 17:52:03 +0000 | [diff] [blame] | 124 | #if PY_MAJOR_VERSION >= 3 |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 125 | extern "C" PyObject *PyInit__lldb(void); |
Zachary Turner | c5b41d6 | 2015-10-16 17:52:03 +0000 | [diff] [blame] | 126 | |
| 127 | #define LLDBSwigPyInit PyInit__lldb |
| 128 | |
| 129 | #else |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 130 | extern "C" void init_lldb(void); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 131 | |
Zachary Turner | c5b41d6 | 2015-10-16 17:52:03 +0000 | [diff] [blame] | 132 | #define LLDBSwigPyInit init_lldb |
| 133 | #endif |
| 134 | |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 135 | // these are the Pythonic implementations of the required callbacks |
| 136 | // these are scripting-language specific, which is why they belong here |
| 137 | // we still need to use function pointers to them instead of relying |
| 138 | // on linkage-time resolution because the SWIG stuff and this file |
| 139 | // get built at different times |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 140 | extern "C" bool LLDBSwigPythonBreakpointCallbackFunction( |
| 141 | const char *python_function_name, const char *session_dictionary_name, |
| 142 | const lldb::StackFrameSP &sb_frame, |
| 143 | const lldb::BreakpointLocationSP &sb_bp_loc); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 144 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 145 | extern "C" bool LLDBSwigPythonWatchpointCallbackFunction( |
| 146 | const char *python_function_name, const char *session_dictionary_name, |
| 147 | const lldb::StackFrameSP &sb_frame, const lldb::WatchpointSP &sb_wp); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 148 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 149 | extern "C" bool LLDBSwigPythonCallTypeScript( |
| 150 | const char *python_function_name, void *session_dictionary, |
| 151 | const lldb::ValueObjectSP &valobj_sp, void **pyfunct_wrapper, |
| 152 | const lldb::TypeSummaryOptionsSP &options_sp, std::string &retval); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 153 | |
| 154 | extern "C" void * |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 155 | LLDBSwigPythonCreateSyntheticProvider(const char *python_class_name, |
| 156 | const char *session_dictionary_name, |
| 157 | const lldb::ValueObjectSP &valobj_sp); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 158 | |
| 159 | extern "C" void * |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 160 | LLDBSwigPythonCreateCommandObject(const char *python_class_name, |
| 161 | const char *session_dictionary_name, |
| 162 | const lldb::DebuggerSP debugger_sp); |
| 163 | |
| 164 | extern "C" void *LLDBSwigPythonCreateScriptedThreadPlan( |
| 165 | const char *python_class_name, const char *session_dictionary_name, |
| 166 | const lldb::ThreadPlanSP &thread_plan_sp); |
| 167 | |
| 168 | extern "C" bool LLDBSWIGPythonCallThreadPlan(void *implementor, |
| 169 | const char *method_name, |
| 170 | Event *event_sp, bool &got_error); |
| 171 | |
| 172 | extern "C" size_t LLDBSwigPython_CalculateNumChildren(void *implementor, |
| 173 | uint32_t max); |
| 174 | |
| 175 | extern "C" void *LLDBSwigPython_GetChildAtIndex(void *implementor, |
| 176 | uint32_t idx); |
| 177 | |
| 178 | extern "C" int LLDBSwigPython_GetIndexOfChildWithName(void *implementor, |
| 179 | const char *child_name); |
| 180 | |
| 181 | extern "C" void *LLDBSWIGPython_CastPyObjectToSBValue(void *data); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 182 | |
| 183 | extern lldb::ValueObjectSP |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 184 | LLDBSWIGPython_GetValueObjectSPFromSBValue(void *data); |
| 185 | |
| 186 | extern "C" bool LLDBSwigPython_UpdateSynthProviderInstance(void *implementor); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 187 | |
| 188 | extern "C" bool |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 189 | LLDBSwigPython_MightHaveChildrenSynthProviderInstance(void *implementor); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 190 | |
| 191 | extern "C" void * |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 192 | LLDBSwigPython_GetValueSynthProviderInstance(void *implementor); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 193 | |
| 194 | extern "C" bool |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 195 | LLDBSwigPythonCallCommand(const char *python_function_name, |
| 196 | const char *session_dictionary_name, |
| 197 | lldb::DebuggerSP &debugger, const char *args, |
| 198 | lldb_private::CommandReturnObject &cmd_retobj, |
| 199 | lldb::ExecutionContextRefSP exe_ctx_ref_sp); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 200 | |
| 201 | extern "C" bool |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 202 | LLDBSwigPythonCallCommandObject(void *implementor, lldb::DebuggerSP &debugger, |
| 203 | const char *args, |
| 204 | lldb_private::CommandReturnObject &cmd_retobj, |
| 205 | lldb::ExecutionContextRefSP exe_ctx_ref_sp); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 206 | |
| 207 | extern "C" bool |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 208 | LLDBSwigPythonCallModuleInit(const char *python_module_name, |
| 209 | const char *session_dictionary_name, |
| 210 | lldb::DebuggerSP &debugger); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 211 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 212 | extern "C" void * |
| 213 | LLDBSWIGPythonCreateOSPlugin(const char *python_class_name, |
| 214 | const char *session_dictionary_name, |
| 215 | const lldb::ProcessSP &process_sp); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 216 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 217 | extern "C" bool LLDBSWIGPythonRunScriptKeywordProcess( |
| 218 | const char *python_function_name, const char *session_dictionary_name, |
| 219 | lldb::ProcessSP &process, std::string &output); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 220 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 221 | extern "C" bool LLDBSWIGPythonRunScriptKeywordThread( |
| 222 | const char *python_function_name, const char *session_dictionary_name, |
| 223 | lldb::ThreadSP &thread, std::string &output); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 224 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 225 | extern "C" bool LLDBSWIGPythonRunScriptKeywordTarget( |
| 226 | const char *python_function_name, const char *session_dictionary_name, |
| 227 | lldb::TargetSP &target, std::string &output); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 228 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 229 | extern "C" bool LLDBSWIGPythonRunScriptKeywordFrame( |
| 230 | const char *python_function_name, const char *session_dictionary_name, |
| 231 | lldb::StackFrameSP &frame, std::string &output); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 232 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 233 | extern "C" bool LLDBSWIGPythonRunScriptKeywordValue( |
| 234 | const char *python_function_name, const char *session_dictionary_name, |
| 235 | lldb::ValueObjectSP &value, std::string &output); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 236 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 237 | extern "C" void * |
| 238 | LLDBSWIGPython_GetDynamicSetting(void *module, const char *setting, |
| 239 | const lldb::TargetSP &target_sp); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 240 | |
| 241 | #endif |
| 242 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 243 | SystemInitializerFull::SystemInitializerFull() {} |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 244 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 245 | SystemInitializerFull::~SystemInitializerFull() {} |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 246 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 247 | void SystemInitializerFull::Initialize() { |
| 248 | SystemInitializerCommon::Initialize(); |
| 249 | ScriptInterpreterNone::Initialize(); |
Zachary Turner | 2c1f46d | 2015-07-30 20:28:07 +0000 | [diff] [blame] | 250 | |
Pavel Labath | a7760cb | 2016-03-16 08:48:56 +0000 | [diff] [blame] | 251 | #ifndef LLDB_DISABLE_PYTHON |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 252 | OperatingSystemPython::Initialize(); |
Pavel Labath | a7760cb | 2016-03-16 08:48:56 +0000 | [diff] [blame] | 253 | #endif |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 254 | OperatingSystemGo::Initialize(); |
Pavel Labath | a7760cb | 2016-03-16 08:48:56 +0000 | [diff] [blame] | 255 | |
Zachary Turner | 2c1f46d | 2015-07-30 20:28:07 +0000 | [diff] [blame] | 256 | #if !defined(LLDB_DISABLE_PYTHON) |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 257 | InitializeSWIG(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 258 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 259 | // ScriptInterpreterPython::Initialize() depends on things like HostInfo being |
| 260 | // initialized |
| 261 | // so it can compute the python directory etc, so we need to do this after |
| 262 | // SystemInitializerCommon::Initialize(). |
| 263 | ScriptInterpreterPython::Initialize(); |
Zachary Turner | 2c1f46d | 2015-07-30 20:28:07 +0000 | [diff] [blame] | 264 | #endif |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 265 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 266 | platform_freebsd::PlatformFreeBSD::Initialize(); |
| 267 | platform_linux::PlatformLinux::Initialize(); |
| 268 | platform_netbsd::PlatformNetBSD::Initialize(); |
| 269 | PlatformWindows::Initialize(); |
| 270 | PlatformKalimba::Initialize(); |
| 271 | platform_android::PlatformAndroid::Initialize(); |
| 272 | PlatformRemoteiOS::Initialize(); |
| 273 | PlatformMacOSX::Initialize(); |
Pavel Labath | f176353 | 2016-06-29 13:58:27 +0000 | [diff] [blame] | 274 | #if defined(__APPLE__) |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 275 | PlatformiOSSimulator::Initialize(); |
| 276 | PlatformDarwinKernel::Initialize(); |
Pavel Labath | f176353 | 2016-06-29 13:58:27 +0000 | [diff] [blame] | 277 | #endif |
| 278 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 279 | // Initialize LLVM and Clang |
| 280 | llvm::InitializeAllTargets(); |
| 281 | llvm::InitializeAllAsmPrinters(); |
| 282 | llvm::InitializeAllTargetMCs(); |
| 283 | llvm::InitializeAllDisassemblers(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 284 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 285 | ClangASTContext::Initialize(); |
| 286 | GoASTContext::Initialize(); |
| 287 | JavaASTContext::Initialize(); |
| 288 | OCamlASTContext::Initialize(); |
Greg Clayton | 56939cb | 2015-09-17 22:23:34 +0000 | [diff] [blame] | 289 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 290 | ABIMacOSX_i386::Initialize(); |
| 291 | ABIMacOSX_arm::Initialize(); |
| 292 | ABIMacOSX_arm64::Initialize(); |
| 293 | ABISysV_arm::Initialize(); |
| 294 | ABISysV_arm64::Initialize(); |
| 295 | ABISysV_hexagon::Initialize(); |
| 296 | ABISysV_i386::Initialize(); |
| 297 | ABISysV_x86_64::Initialize(); |
| 298 | ABISysV_ppc::Initialize(); |
| 299 | ABISysV_ppc64::Initialize(); |
| 300 | ABISysV_mips::Initialize(); |
| 301 | ABISysV_mips64::Initialize(); |
| 302 | ABISysV_s390x::Initialize(); |
| 303 | DisassemblerLLVMC::Initialize(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 304 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 305 | JITLoaderGDB::Initialize(); |
| 306 | ProcessElfCore::Initialize(); |
Adrian McCarthy | c96516f | 2015-08-03 23:01:51 +0000 | [diff] [blame] | 307 | #if defined(_MSC_VER) |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 308 | ProcessWinMiniDump::Initialize(); |
Adrian McCarthy | c96516f | 2015-08-03 23:01:51 +0000 | [diff] [blame] | 309 | #endif |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 310 | MemoryHistoryASan::Initialize(); |
| 311 | AddressSanitizerRuntime::Initialize(); |
| 312 | ThreadSanitizerRuntime::Initialize(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 313 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 314 | SymbolVendorELF::Initialize(); |
| 315 | SymbolFileDWARF::Initialize(); |
| 316 | SymbolFilePDB::Initialize(); |
| 317 | SymbolFileSymtab::Initialize(); |
| 318 | UnwindAssemblyInstEmulation::Initialize(); |
| 319 | UnwindAssembly_x86::Initialize(); |
| 320 | EmulateInstructionARM64::Initialize(); |
| 321 | SymbolFileDWARFDebugMap::Initialize(); |
| 322 | ItaniumABILanguageRuntime::Initialize(); |
| 323 | AppleObjCRuntimeV2::Initialize(); |
| 324 | AppleObjCRuntimeV1::Initialize(); |
| 325 | SystemRuntimeMacOSX::Initialize(); |
| 326 | RenderScriptRuntime::Initialize(); |
| 327 | GoLanguageRuntime::Initialize(); |
| 328 | JavaLanguageRuntime::Initialize(); |
Ed Maste | 81b4c5f | 2016-01-04 01:43:47 +0000 | [diff] [blame] | 329 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 330 | CPlusPlusLanguage::Initialize(); |
| 331 | GoLanguage::Initialize(); |
| 332 | JavaLanguage::Initialize(); |
| 333 | ObjCLanguage::Initialize(); |
| 334 | ObjCPlusPlusLanguage::Initialize(); |
| 335 | OCamlLanguage::Initialize(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 336 | |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 337 | #if defined(_MSC_VER) |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 338 | ProcessWindowsLive::Initialize(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 339 | #endif |
| 340 | #if defined(__FreeBSD__) |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 341 | ProcessFreeBSD::Initialize(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 342 | #endif |
| 343 | #if defined(__APPLE__) |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 344 | SymbolVendorMacOSX::Initialize(); |
| 345 | ProcessKDP::Initialize(); |
| 346 | ProcessMachCore::Initialize(); |
| 347 | PlatformAppleTVSimulator::Initialize(); |
| 348 | PlatformAppleWatchSimulator::Initialize(); |
| 349 | PlatformRemoteAppleTV::Initialize(); |
| 350 | PlatformRemoteAppleWatch::Initialize(); |
| 351 | DynamicLoaderDarwinKernel::Initialize(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 352 | #endif |
Todd Fiala | 7593001 | 2016-08-19 04:21:48 +0000 | [diff] [blame] | 353 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 354 | // This plugin is valid on any host that talks to a Darwin remote. |
| 355 | // It shouldn't be limited to __APPLE__. |
| 356 | StructuredDataDarwinLog::Initialize(); |
Todd Fiala | 7593001 | 2016-08-19 04:21:48 +0000 | [diff] [blame] | 357 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 358 | //---------------------------------------------------------------------- |
| 359 | // Platform agnostic plugins |
| 360 | //---------------------------------------------------------------------- |
| 361 | platform_gdb_server::PlatformRemoteGDBServer::Initialize(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 362 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 363 | process_gdb_remote::ProcessGDBRemote::Initialize(); |
| 364 | DynamicLoaderMacOSXDYLD::Initialize(); |
| 365 | DynamicLoaderMacOS::Initialize(); |
| 366 | DynamicLoaderPOSIXDYLD::Initialize(); |
| 367 | DynamicLoaderStatic::Initialize(); |
| 368 | DynamicLoaderWindowsDYLD::Initialize(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 369 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 370 | // Scan for any system or user LLDB plug-ins |
| 371 | PluginManager::Initialize(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 372 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 373 | // The process settings need to know about installed plug-ins, so the Settings |
| 374 | // must be initialized |
| 375 | // AFTER PluginManager::Initialize is called. |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 376 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 377 | Debugger::SettingsInitialize(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 378 | } |
| 379 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 380 | void SystemInitializerFull::InitializeSWIG() { |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 381 | #if !defined(LLDB_DISABLE_PYTHON) |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 382 | ScriptInterpreterPython::InitializeInterpreter( |
| 383 | LLDBSwigPyInit, LLDBSwigPythonBreakpointCallbackFunction, |
| 384 | LLDBSwigPythonWatchpointCallbackFunction, LLDBSwigPythonCallTypeScript, |
| 385 | LLDBSwigPythonCreateSyntheticProvider, LLDBSwigPythonCreateCommandObject, |
| 386 | LLDBSwigPython_CalculateNumChildren, LLDBSwigPython_GetChildAtIndex, |
| 387 | LLDBSwigPython_GetIndexOfChildWithName, |
| 388 | LLDBSWIGPython_CastPyObjectToSBValue, |
| 389 | LLDBSWIGPython_GetValueObjectSPFromSBValue, |
| 390 | LLDBSwigPython_UpdateSynthProviderInstance, |
| 391 | LLDBSwigPython_MightHaveChildrenSynthProviderInstance, |
| 392 | LLDBSwigPython_GetValueSynthProviderInstance, LLDBSwigPythonCallCommand, |
| 393 | LLDBSwigPythonCallCommandObject, LLDBSwigPythonCallModuleInit, |
| 394 | LLDBSWIGPythonCreateOSPlugin, LLDBSWIGPythonRunScriptKeywordProcess, |
| 395 | LLDBSWIGPythonRunScriptKeywordThread, |
| 396 | LLDBSWIGPythonRunScriptKeywordTarget, LLDBSWIGPythonRunScriptKeywordFrame, |
| 397 | LLDBSWIGPythonRunScriptKeywordValue, LLDBSWIGPython_GetDynamicSetting, |
| 398 | LLDBSwigPythonCreateScriptedThreadPlan, LLDBSWIGPythonCallThreadPlan); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 399 | #endif |
| 400 | } |
| 401 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 402 | void SystemInitializerFull::Terminate() { |
| 403 | Timer scoped_timer(LLVM_PRETTY_FUNCTION, LLVM_PRETTY_FUNCTION); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 404 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 405 | Debugger::SettingsTerminate(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 406 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 407 | // Terminate and unload and loaded system or user LLDB plug-ins |
| 408 | PluginManager::Terminate(); |
Greg Clayton | 56939cb | 2015-09-17 22:23:34 +0000 | [diff] [blame] | 409 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 410 | ClangASTContext::Terminate(); |
| 411 | GoASTContext::Terminate(); |
| 412 | JavaASTContext::Terminate(); |
| 413 | OCamlASTContext::Terminate(); |
Greg Clayton | 56939cb | 2015-09-17 22:23:34 +0000 | [diff] [blame] | 414 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 415 | ABIMacOSX_i386::Terminate(); |
| 416 | ABIMacOSX_arm::Terminate(); |
| 417 | ABIMacOSX_arm64::Terminate(); |
| 418 | ABISysV_arm::Terminate(); |
| 419 | ABISysV_arm64::Terminate(); |
| 420 | ABISysV_hexagon::Terminate(); |
| 421 | ABISysV_i386::Terminate(); |
| 422 | ABISysV_x86_64::Terminate(); |
| 423 | ABISysV_ppc::Terminate(); |
| 424 | ABISysV_ppc64::Terminate(); |
| 425 | ABISysV_mips::Terminate(); |
| 426 | ABISysV_mips64::Terminate(); |
| 427 | ABISysV_s390x::Terminate(); |
| 428 | DisassemblerLLVMC::Terminate(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 429 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 430 | JITLoaderGDB::Terminate(); |
| 431 | ProcessElfCore::Terminate(); |
Adrian McCarthy | c96516f | 2015-08-03 23:01:51 +0000 | [diff] [blame] | 432 | #if defined(_MSC_VER) |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 433 | ProcessWinMiniDump::Terminate(); |
Adrian McCarthy | c96516f | 2015-08-03 23:01:51 +0000 | [diff] [blame] | 434 | #endif |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 435 | MemoryHistoryASan::Terminate(); |
| 436 | AddressSanitizerRuntime::Terminate(); |
| 437 | ThreadSanitizerRuntime::Terminate(); |
| 438 | SymbolVendorELF::Terminate(); |
| 439 | SymbolFileDWARF::Terminate(); |
| 440 | SymbolFilePDB::Terminate(); |
| 441 | SymbolFileSymtab::Terminate(); |
| 442 | UnwindAssembly_x86::Terminate(); |
| 443 | UnwindAssemblyInstEmulation::Terminate(); |
| 444 | EmulateInstructionARM64::Terminate(); |
| 445 | SymbolFileDWARFDebugMap::Terminate(); |
| 446 | ItaniumABILanguageRuntime::Terminate(); |
| 447 | AppleObjCRuntimeV2::Terminate(); |
| 448 | AppleObjCRuntimeV1::Terminate(); |
| 449 | SystemRuntimeMacOSX::Terminate(); |
| 450 | RenderScriptRuntime::Terminate(); |
| 451 | JavaLanguageRuntime::Terminate(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 452 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 453 | CPlusPlusLanguage::Terminate(); |
| 454 | GoLanguage::Terminate(); |
| 455 | JavaLanguage::Terminate(); |
| 456 | ObjCLanguage::Terminate(); |
| 457 | ObjCPlusPlusLanguage::Terminate(); |
| 458 | OCamlLanguage::Terminate(); |
Ed Maste | 81b4c5f | 2016-01-04 01:43:47 +0000 | [diff] [blame] | 459 | |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 460 | #if defined(__APPLE__) |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 461 | DynamicLoaderDarwinKernel::Terminate(); |
| 462 | ProcessMachCore::Terminate(); |
| 463 | ProcessKDP::Terminate(); |
| 464 | SymbolVendorMacOSX::Terminate(); |
| 465 | PlatformAppleTVSimulator::Terminate(); |
| 466 | PlatformAppleWatchSimulator::Terminate(); |
| 467 | PlatformRemoteAppleTV::Terminate(); |
| 468 | PlatformRemoteAppleWatch::Terminate(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 469 | #endif |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 470 | |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 471 | #if defined(__FreeBSD__) |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 472 | ProcessFreeBSD::Terminate(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 473 | #endif |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 474 | Debugger::SettingsTerminate(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 475 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 476 | platform_gdb_server::PlatformRemoteGDBServer::Terminate(); |
| 477 | process_gdb_remote::ProcessGDBRemote::Terminate(); |
| 478 | StructuredDataDarwinLog::Terminate(); |
Todd Fiala | 7593001 | 2016-08-19 04:21:48 +0000 | [diff] [blame] | 479 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 480 | DynamicLoaderMacOSXDYLD::Terminate(); |
| 481 | DynamicLoaderMacOS::Terminate(); |
| 482 | DynamicLoaderPOSIXDYLD::Terminate(); |
| 483 | DynamicLoaderStatic::Terminate(); |
| 484 | DynamicLoaderWindowsDYLD::Terminate(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 485 | |
Pavel Labath | a7760cb | 2016-03-16 08:48:56 +0000 | [diff] [blame] | 486 | #ifndef LLDB_DISABLE_PYTHON |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 487 | OperatingSystemPython::Terminate(); |
Pavel Labath | a7760cb | 2016-03-16 08:48:56 +0000 | [diff] [blame] | 488 | #endif |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 489 | OperatingSystemGo::Terminate(); |
Pavel Labath | a7760cb | 2016-03-16 08:48:56 +0000 | [diff] [blame] | 490 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 491 | platform_freebsd::PlatformFreeBSD::Terminate(); |
| 492 | platform_linux::PlatformLinux::Terminate(); |
| 493 | platform_netbsd::PlatformNetBSD::Terminate(); |
| 494 | PlatformWindows::Terminate(); |
| 495 | PlatformKalimba::Terminate(); |
| 496 | platform_android::PlatformAndroid::Terminate(); |
| 497 | PlatformMacOSX::Terminate(); |
| 498 | PlatformRemoteiOS::Terminate(); |
Pavel Labath | f176353 | 2016-06-29 13:58:27 +0000 | [diff] [blame] | 499 | #if defined(__APPLE__) |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 500 | PlatformiOSSimulator::Terminate(); |
| 501 | PlatformDarwinKernel::Terminate(); |
Pavel Labath | f176353 | 2016-06-29 13:58:27 +0000 | [diff] [blame] | 502 | #endif |
| 503 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame^] | 504 | // Now shutdown the common parts, in reverse order. |
| 505 | SystemInitializerCommon::Terminate(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 506 | } |