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