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