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