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" |
Dimitar Vlahovski | 7b18dd4 | 2016-10-31 15:35:18 +0000 | [diff] [blame] | 81 | #include "Plugins/Process/minidump/ProcessMinidump.h" |
Zachary Turner | 2c1f46d | 2015-07-30 20:28:07 +0000 | [diff] [blame] | 82 | #include "Plugins/ScriptInterpreter/None/ScriptInterpreterNone.h" |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 83 | #include "Plugins/SymbolFile/DWARF/SymbolFileDWARF.h" |
| 84 | #include "Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h" |
Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 85 | #include "Plugins/SymbolFile/PDB/SymbolFilePDB.h" |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 86 | #include "Plugins/SymbolFile/Symtab/SymbolFileSymtab.h" |
| 87 | #include "Plugins/SymbolVendor/ELF/SymbolVendorELF.h" |
| 88 | #include "Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.h" |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 89 | #include "Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h" |
Zachary Turner | 74e08ca | 2016-03-02 22:05:52 +0000 | [diff] [blame] | 90 | #include "Plugins/UnwindAssembly/x86/UnwindAssembly-x86.h" |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 91 | |
| 92 | #if defined(__APPLE__) |
Pavel Labath | f176353 | 2016-06-29 13:58:27 +0000 | [diff] [blame] | 93 | #include "Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h" |
Jason Molenda | 5e88be9 | 2015-11-06 00:22:53 +0000 | [diff] [blame] | 94 | #include "Plugins/Platform/MacOSX/PlatformAppleTVSimulator.h" |
| 95 | #include "Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.h" |
Pavel Labath | f176353 | 2016-06-29 13:58:27 +0000 | [diff] [blame] | 96 | #include "Plugins/Platform/MacOSX/PlatformDarwinKernel.h" |
Jason Molenda | 5e88be9 | 2015-11-06 00:22:53 +0000 | [diff] [blame] | 97 | #include "Plugins/Platform/MacOSX/PlatformRemoteAppleTV.h" |
| 98 | #include "Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.h" |
Pavel Labath | f176353 | 2016-06-29 13:58:27 +0000 | [diff] [blame] | 99 | #include "Plugins/Platform/MacOSX/PlatformiOSSimulator.h" |
| 100 | #include "Plugins/Process/MacOSX-Kernel/ProcessKDP.h" |
| 101 | #include "Plugins/Process/mach-core/ProcessMachCore.h" |
| 102 | #include "Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.h" |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 103 | #endif |
Todd Fiala | 7593001 | 2016-08-19 04:21:48 +0000 | [diff] [blame] | 104 | #include "Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.h" |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 105 | |
| 106 | #if defined(__FreeBSD__) |
| 107 | #include "Plugins/Process/FreeBSD/ProcessFreeBSD.h" |
| 108 | #endif |
| 109 | |
Hafiz Abid Qadeer | f6ee79c | 2016-12-15 15:00:41 +0000 | [diff] [blame^] | 110 | #if defined(_WIN32) |
Adrian McCarthy | 4ad5def | 2016-11-23 16:26:37 +0000 | [diff] [blame] | 111 | #include "Plugins/Process/Windows/Common/ProcessWindows.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(); |
Dimitar Vlahovski | 7b18dd4 | 2016-10-31 15:35:18 +0000 | [diff] [blame] | 307 | minidump::ProcessMinidump::Initialize(); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 308 | MemoryHistoryASan::Initialize(); |
| 309 | AddressSanitizerRuntime::Initialize(); |
| 310 | ThreadSanitizerRuntime::Initialize(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 311 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 312 | SymbolVendorELF::Initialize(); |
| 313 | SymbolFileDWARF::Initialize(); |
| 314 | SymbolFilePDB::Initialize(); |
| 315 | SymbolFileSymtab::Initialize(); |
| 316 | UnwindAssemblyInstEmulation::Initialize(); |
| 317 | UnwindAssembly_x86::Initialize(); |
| 318 | EmulateInstructionARM64::Initialize(); |
| 319 | SymbolFileDWARFDebugMap::Initialize(); |
| 320 | ItaniumABILanguageRuntime::Initialize(); |
| 321 | AppleObjCRuntimeV2::Initialize(); |
| 322 | AppleObjCRuntimeV1::Initialize(); |
| 323 | SystemRuntimeMacOSX::Initialize(); |
| 324 | RenderScriptRuntime::Initialize(); |
| 325 | GoLanguageRuntime::Initialize(); |
| 326 | JavaLanguageRuntime::Initialize(); |
Ed Maste | 81b4c5f | 2016-01-04 01:43:47 +0000 | [diff] [blame] | 327 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 328 | CPlusPlusLanguage::Initialize(); |
| 329 | GoLanguage::Initialize(); |
| 330 | JavaLanguage::Initialize(); |
| 331 | ObjCLanguage::Initialize(); |
| 332 | ObjCPlusPlusLanguage::Initialize(); |
| 333 | OCamlLanguage::Initialize(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 334 | |
Hafiz Abid Qadeer | f6ee79c | 2016-12-15 15:00:41 +0000 | [diff] [blame^] | 335 | #if defined(_WIN32) |
Adrian McCarthy | 4ad5def | 2016-11-23 16:26:37 +0000 | [diff] [blame] | 336 | ProcessWindows::Initialize(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 337 | #endif |
| 338 | #if defined(__FreeBSD__) |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 339 | ProcessFreeBSD::Initialize(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 340 | #endif |
| 341 | #if defined(__APPLE__) |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 342 | SymbolVendorMacOSX::Initialize(); |
| 343 | ProcessKDP::Initialize(); |
| 344 | ProcessMachCore::Initialize(); |
| 345 | PlatformAppleTVSimulator::Initialize(); |
| 346 | PlatformAppleWatchSimulator::Initialize(); |
| 347 | PlatformRemoteAppleTV::Initialize(); |
| 348 | PlatformRemoteAppleWatch::Initialize(); |
| 349 | DynamicLoaderDarwinKernel::Initialize(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 350 | #endif |
Todd Fiala | 7593001 | 2016-08-19 04:21:48 +0000 | [diff] [blame] | 351 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 352 | // This plugin is valid on any host that talks to a Darwin remote. |
| 353 | // It shouldn't be limited to __APPLE__. |
| 354 | StructuredDataDarwinLog::Initialize(); |
Todd Fiala | 7593001 | 2016-08-19 04:21:48 +0000 | [diff] [blame] | 355 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 356 | //---------------------------------------------------------------------- |
| 357 | // Platform agnostic plugins |
| 358 | //---------------------------------------------------------------------- |
| 359 | platform_gdb_server::PlatformRemoteGDBServer::Initialize(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 360 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 361 | process_gdb_remote::ProcessGDBRemote::Initialize(); |
| 362 | DynamicLoaderMacOSXDYLD::Initialize(); |
| 363 | DynamicLoaderMacOS::Initialize(); |
| 364 | DynamicLoaderPOSIXDYLD::Initialize(); |
| 365 | DynamicLoaderStatic::Initialize(); |
| 366 | DynamicLoaderWindowsDYLD::Initialize(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 367 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 368 | // Scan for any system or user LLDB plug-ins |
| 369 | PluginManager::Initialize(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 370 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 371 | // The process settings need to know about installed plug-ins, so the Settings |
| 372 | // must be initialized |
| 373 | // AFTER PluginManager::Initialize is called. |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 374 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 375 | Debugger::SettingsInitialize(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 376 | } |
| 377 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 378 | void SystemInitializerFull::InitializeSWIG() { |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 379 | #if !defined(LLDB_DISABLE_PYTHON) |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 380 | ScriptInterpreterPython::InitializeInterpreter( |
| 381 | LLDBSwigPyInit, LLDBSwigPythonBreakpointCallbackFunction, |
| 382 | LLDBSwigPythonWatchpointCallbackFunction, LLDBSwigPythonCallTypeScript, |
| 383 | LLDBSwigPythonCreateSyntheticProvider, LLDBSwigPythonCreateCommandObject, |
| 384 | LLDBSwigPython_CalculateNumChildren, LLDBSwigPython_GetChildAtIndex, |
| 385 | LLDBSwigPython_GetIndexOfChildWithName, |
| 386 | LLDBSWIGPython_CastPyObjectToSBValue, |
| 387 | LLDBSWIGPython_GetValueObjectSPFromSBValue, |
| 388 | LLDBSwigPython_UpdateSynthProviderInstance, |
| 389 | LLDBSwigPython_MightHaveChildrenSynthProviderInstance, |
| 390 | LLDBSwigPython_GetValueSynthProviderInstance, LLDBSwigPythonCallCommand, |
| 391 | LLDBSwigPythonCallCommandObject, LLDBSwigPythonCallModuleInit, |
| 392 | LLDBSWIGPythonCreateOSPlugin, LLDBSWIGPythonRunScriptKeywordProcess, |
| 393 | LLDBSWIGPythonRunScriptKeywordThread, |
| 394 | LLDBSWIGPythonRunScriptKeywordTarget, LLDBSWIGPythonRunScriptKeywordFrame, |
| 395 | LLDBSWIGPythonRunScriptKeywordValue, LLDBSWIGPython_GetDynamicSetting, |
| 396 | LLDBSwigPythonCreateScriptedThreadPlan, LLDBSWIGPythonCallThreadPlan); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 397 | #endif |
| 398 | } |
| 399 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 400 | void SystemInitializerFull::Terminate() { |
| 401 | Timer scoped_timer(LLVM_PRETTY_FUNCTION, LLVM_PRETTY_FUNCTION); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 402 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 403 | Debugger::SettingsTerminate(); |
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 | // Terminate and unload and loaded system or user LLDB plug-ins |
| 406 | PluginManager::Terminate(); |
Greg Clayton | 56939cb | 2015-09-17 22:23:34 +0000 | [diff] [blame] | 407 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 408 | ClangASTContext::Terminate(); |
| 409 | GoASTContext::Terminate(); |
| 410 | JavaASTContext::Terminate(); |
| 411 | OCamlASTContext::Terminate(); |
Greg Clayton | 56939cb | 2015-09-17 22:23:34 +0000 | [diff] [blame] | 412 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 413 | ABIMacOSX_i386::Terminate(); |
| 414 | ABIMacOSX_arm::Terminate(); |
| 415 | ABIMacOSX_arm64::Terminate(); |
| 416 | ABISysV_arm::Terminate(); |
| 417 | ABISysV_arm64::Terminate(); |
| 418 | ABISysV_hexagon::Terminate(); |
| 419 | ABISysV_i386::Terminate(); |
| 420 | ABISysV_x86_64::Terminate(); |
| 421 | ABISysV_ppc::Terminate(); |
| 422 | ABISysV_ppc64::Terminate(); |
| 423 | ABISysV_mips::Terminate(); |
| 424 | ABISysV_mips64::Terminate(); |
| 425 | ABISysV_s390x::Terminate(); |
| 426 | DisassemblerLLVMC::Terminate(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 427 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 428 | JITLoaderGDB::Terminate(); |
| 429 | ProcessElfCore::Terminate(); |
Dimitar Vlahovski | 7b18dd4 | 2016-10-31 15:35:18 +0000 | [diff] [blame] | 430 | minidump::ProcessMinidump::Terminate(); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 431 | MemoryHistoryASan::Terminate(); |
| 432 | AddressSanitizerRuntime::Terminate(); |
| 433 | ThreadSanitizerRuntime::Terminate(); |
| 434 | SymbolVendorELF::Terminate(); |
| 435 | SymbolFileDWARF::Terminate(); |
| 436 | SymbolFilePDB::Terminate(); |
| 437 | SymbolFileSymtab::Terminate(); |
| 438 | UnwindAssembly_x86::Terminate(); |
| 439 | UnwindAssemblyInstEmulation::Terminate(); |
| 440 | EmulateInstructionARM64::Terminate(); |
| 441 | SymbolFileDWARFDebugMap::Terminate(); |
| 442 | ItaniumABILanguageRuntime::Terminate(); |
| 443 | AppleObjCRuntimeV2::Terminate(); |
| 444 | AppleObjCRuntimeV1::Terminate(); |
| 445 | SystemRuntimeMacOSX::Terminate(); |
| 446 | RenderScriptRuntime::Terminate(); |
| 447 | JavaLanguageRuntime::Terminate(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 448 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 449 | CPlusPlusLanguage::Terminate(); |
| 450 | GoLanguage::Terminate(); |
| 451 | JavaLanguage::Terminate(); |
| 452 | ObjCLanguage::Terminate(); |
| 453 | ObjCPlusPlusLanguage::Terminate(); |
| 454 | OCamlLanguage::Terminate(); |
Ed Maste | 81b4c5f | 2016-01-04 01:43:47 +0000 | [diff] [blame] | 455 | |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 456 | #if defined(__APPLE__) |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 457 | DynamicLoaderDarwinKernel::Terminate(); |
| 458 | ProcessMachCore::Terminate(); |
| 459 | ProcessKDP::Terminate(); |
| 460 | SymbolVendorMacOSX::Terminate(); |
| 461 | PlatformAppleTVSimulator::Terminate(); |
| 462 | PlatformAppleWatchSimulator::Terminate(); |
| 463 | PlatformRemoteAppleTV::Terminate(); |
| 464 | PlatformRemoteAppleWatch::Terminate(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 465 | #endif |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 466 | |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 467 | #if defined(__FreeBSD__) |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 468 | ProcessFreeBSD::Terminate(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 469 | #endif |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 470 | Debugger::SettingsTerminate(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 471 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 472 | platform_gdb_server::PlatformRemoteGDBServer::Terminate(); |
| 473 | process_gdb_remote::ProcessGDBRemote::Terminate(); |
| 474 | StructuredDataDarwinLog::Terminate(); |
Todd Fiala | 7593001 | 2016-08-19 04:21:48 +0000 | [diff] [blame] | 475 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 476 | DynamicLoaderMacOSXDYLD::Terminate(); |
| 477 | DynamicLoaderMacOS::Terminate(); |
| 478 | DynamicLoaderPOSIXDYLD::Terminate(); |
| 479 | DynamicLoaderStatic::Terminate(); |
| 480 | DynamicLoaderWindowsDYLD::Terminate(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 481 | |
Pavel Labath | a7760cb | 2016-03-16 08:48:56 +0000 | [diff] [blame] | 482 | #ifndef LLDB_DISABLE_PYTHON |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 483 | OperatingSystemPython::Terminate(); |
Pavel Labath | a7760cb | 2016-03-16 08:48:56 +0000 | [diff] [blame] | 484 | #endif |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 485 | OperatingSystemGo::Terminate(); |
Pavel Labath | a7760cb | 2016-03-16 08:48:56 +0000 | [diff] [blame] | 486 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 487 | platform_freebsd::PlatformFreeBSD::Terminate(); |
| 488 | platform_linux::PlatformLinux::Terminate(); |
| 489 | platform_netbsd::PlatformNetBSD::Terminate(); |
| 490 | PlatformWindows::Terminate(); |
| 491 | PlatformKalimba::Terminate(); |
| 492 | platform_android::PlatformAndroid::Terminate(); |
| 493 | PlatformMacOSX::Terminate(); |
| 494 | PlatformRemoteiOS::Terminate(); |
Pavel Labath | f176353 | 2016-06-29 13:58:27 +0000 | [diff] [blame] | 495 | #if defined(__APPLE__) |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 496 | PlatformiOSSimulator::Terminate(); |
| 497 | PlatformDarwinKernel::Terminate(); |
Pavel Labath | f176353 | 2016-06-29 13:58:27 +0000 | [diff] [blame] | 498 | #endif |
| 499 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 500 | // Now shutdown the common parts, in reverse order. |
| 501 | SystemInitializerCommon::Terminate(); |
Zachary Turner | e6e2bb3 | 2015-03-31 21:03:22 +0000 | [diff] [blame] | 502 | } |