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 10 #if !defined(LLDB_DISABLE_PYTHON) 11 #include "Plugins/ScriptInterpreter/Python/lldb-python.h" 12 #endif 13 14 #include "SystemInitializerFull.h" 15 16 #include "lldb/API/SBCommandInterpreter.h" 17 18 #if !defined(LLDB_DISABLE_PYTHON) 19 #include "Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h" 20 #endif 21 22 #include "lldb/Core/Debugger.h" 23 #include "lldb/Host/Host.h" 24 #include "lldb/Initialization/SystemInitializerCommon.h" 25 #include "lldb/Interpreter/CommandInterpreter.h" 26 #include "lldb/Symbol/ClangASTContext.h" 27 #include "lldb/Utility/Timer.h" 28 29 #ifdef LLDB_ENABLE_ALL 30 #include "Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h" 31 #include "Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.h" 32 #include "Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h" 33 #endif // LLDB_ENABLE_ALL 34 #include "Plugins/ABI/SysV-arm/ABISysV_arm.h" 35 #include "Plugins/ABI/SysV-arm64/ABISysV_arm64.h" 36 #ifdef LLDB_ENABLE_ALL 37 #include "Plugins/ABI/SysV-hexagon/ABISysV_hexagon.h" 38 #endif // LLDB_ENABLE_ALL 39 #include "Plugins/ABI/SysV-i386/ABISysV_i386.h" 40 #include "Plugins/ABI/SysV-mips/ABISysV_mips.h" 41 #include "Plugins/ABI/SysV-mips64/ABISysV_mips64.h" 42 #include "Plugins/ABI/SysV-ppc/ABISysV_ppc.h" 43 #include "Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h" 44 #ifdef LLDB_ENABLE_ALL 45 #include "Plugins/ABI/SysV-s390x/ABISysV_s390x.h" 46 #endif // LLDB_ENABLE_ALL 47 #include "Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h" 48 #include "Plugins/Architecture/Arm/ArchitectureArm.h" 49 #include "Plugins/Architecture/Mips/ArchitectureMips.h" 50 #include "Plugins/Architecture/PPC64/ArchitecturePPC64.h" 51 #include "Plugins/Disassembler/llvm/DisassemblerLLVMC.h" 52 #ifdef LLDB_ENABLE_ALL 53 #include "Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.h" 54 #include "Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h" 55 #endif // LLDB_ENABLE_ALL 56 #include "Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h" 57 #include "Plugins/DynamicLoader/Static/DynamicLoaderStatic.h" 58 #ifdef LLDB_ENABLE_ALL 59 #include "Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.h" 60 #endif // LLDB_ENABLE_ALL 61 #include "Plugins/Instruction/ARM64/EmulateInstructionARM64.h" 62 #include "Plugins/Instruction/PPC64/EmulateInstructionPPC64.h" 63 #include "Plugins/InstrumentationRuntime/ASan/ASanRuntime.h" 64 #include "Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.h" 65 #ifdef LLDB_ENABLE_ALL 66 #include "Plugins/InstrumentationRuntime/TSan/TSanRuntime.h" 67 #endif // LLDB_ENABLE_ALL 68 #include "Plugins/InstrumentationRuntime/UBSan/UBSanRuntime.h" 69 #include "Plugins/JITLoader/GDB/JITLoaderGDB.h" 70 #include "Plugins/Language/CPlusPlus/CPlusPlusLanguage.h" 71 #ifdef LLDB_ENABLE_ALL 72 #include "Plugins/Language/ObjC/ObjCLanguage.h" 73 #include "Plugins/Language/ObjCPlusPlus/ObjCPlusPlusLanguage.h" 74 #endif // LLDB_ENABLE_ALL 75 #include "Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h" 76 #ifdef LLDB_ENABLE_ALL 77 #include "Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h" 78 #include "Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h" 79 #include "Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h" 80 #endif // LLDB_ENABLE_ALL 81 #include "Plugins/MemoryHistory/asan/MemoryHistoryASan.h" 82 #include "Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.h" 83 #include "Plugins/ObjectFile/ELF/ObjectFileELF.h" 84 #ifdef LLDB_ENABLE_ALL 85 #include "Plugins/ObjectFile/Mach-O/ObjectFileMachO.h" 86 #include "Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h" 87 #include "Plugins/OperatingSystem/Python/OperatingSystemPython.h" 88 #include "Plugins/Platform/Android/PlatformAndroid.h" 89 #endif // LLDB_ENABLE_ALL 90 #include "Plugins/Platform/FreeBSD/PlatformFreeBSD.h" 91 #ifdef LLDB_ENABLE_ALL 92 #include "Plugins/Platform/Kalimba/PlatformKalimba.h" 93 #include "Plugins/Platform/Linux/PlatformLinux.h" 94 #include "Plugins/Platform/MacOSX/PlatformMacOSX.h" 95 #include "Plugins/Platform/MacOSX/PlatformRemoteiOS.h" 96 #include "Plugins/Platform/NetBSD/PlatformNetBSD.h" 97 #include "Plugins/Platform/OpenBSD/PlatformOpenBSD.h" 98 #include "Plugins/Platform/Windows/PlatformWindows.h" 99 #endif // LLDB_ENABLE_ALL 100 #include "Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h" 101 #include "Plugins/Process/elf-core/ProcessElfCore.h" 102 #include "Plugins/Process/gdb-remote/ProcessGDBRemote.h" 103 #ifdef LLDB_ENABLE_ALL 104 #include "Plugins/Process/mach-core/ProcessMachCore.h" 105 #include "Plugins/Process/minidump/ProcessMinidump.h" 106 #endif // LLDB_ENABLE_ALL 107 #include "Plugins/ScriptInterpreter/None/ScriptInterpreterNone.h" 108 #include "Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h" 109 #include "Plugins/SymbolFile/DWARF/SymbolFileDWARF.h" 110 #include "Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h" 111 #ifdef LLDB_ENABLE_ALL 112 #include "Plugins/SymbolFile/PDB/SymbolFilePDB.h" 113 #endif // LLDB_ENABLE_ALL 114 #include "Plugins/SymbolFile/Symtab/SymbolFileSymtab.h" 115 #include "Plugins/SymbolVendor/ELF/SymbolVendorELF.h" 116 #ifdef LLDB_ENABLE_ALL 117 #include "Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.h" 118 #endif // LLDB_ENABLE_ALL 119 #include "Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h" 120 #include "Plugins/UnwindAssembly/x86/UnwindAssembly-x86.h" 121 122 #if defined(__APPLE__) 123 #include "Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h" 124 #include "Plugins/Platform/MacOSX/PlatformAppleTVSimulator.h" 125 #include "Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.h" 126 #include "Plugins/Platform/MacOSX/PlatformDarwinKernel.h" 127 #include "Plugins/Platform/MacOSX/PlatformRemoteAppleTV.h" 128 #include "Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.h" 129 #include "Plugins/Platform/MacOSX/PlatformRemoteAppleBridge.h" 130 #include "Plugins/Platform/MacOSX/PlatformiOSSimulator.h" 131 #include "Plugins/Process/MacOSX-Kernel/ProcessKDP.h" 132 #include "Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.h" 133 #endif 134 #ifdef LLDB_ENABLE_ALL 135 #include "Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.h" 136 #endif // LLDB_ENABLE_ALL 137 138 #if defined(__FreeBSD__) 139 #include "Plugins/Process/FreeBSD/ProcessFreeBSD.h" 140 #endif 141 142 #if defined(_WIN32) 143 #include "Plugins/Process/Windows/Common/ProcessWindows.h" 144 #include "lldb/Host/windows/windows.h" 145 #endif 146 147 #include "llvm/Support/TargetSelect.h" 148 149 #include <string> 150 151 using namespace lldb_private; 152 153 #ifndef LLDB_DISABLE_PYTHON 154 155 // Defined in the SWIG source file 156 #if PY_MAJOR_VERSION >= 3 157 extern "C" PyObject *PyInit__lldb(void); 158 159 #define LLDBSwigPyInit PyInit__lldb 160 161 #else 162 extern "C" void init_lldb(void); 163 164 #define LLDBSwigPyInit init_lldb 165 #endif 166 167 // these are the Pythonic implementations of the required callbacks these are 168 // scripting-language specific, which is why they belong here we still need to 169 // use function pointers to them instead of relying on linkage-time resolution 170 // because the SWIG stuff and this file get built at different times 171 extern "C" bool LLDBSwigPythonBreakpointCallbackFunction( 172 const char *python_function_name, const char *session_dictionary_name, 173 const lldb::StackFrameSP &sb_frame, 174 const lldb::BreakpointLocationSP &sb_bp_loc); 175 176 extern "C" bool LLDBSwigPythonWatchpointCallbackFunction( 177 const char *python_function_name, const char *session_dictionary_name, 178 const lldb::StackFrameSP &sb_frame, const lldb::WatchpointSP &sb_wp); 179 180 extern "C" bool LLDBSwigPythonCallTypeScript( 181 const char *python_function_name, void *session_dictionary, 182 const lldb::ValueObjectSP &valobj_sp, void **pyfunct_wrapper, 183 const lldb::TypeSummaryOptionsSP &options_sp, std::string &retval); 184 185 extern "C" void * 186 LLDBSwigPythonCreateSyntheticProvider(const char *python_class_name, 187 const char *session_dictionary_name, 188 const lldb::ValueObjectSP &valobj_sp); 189 190 extern "C" void * 191 LLDBSwigPythonCreateCommandObject(const char *python_class_name, 192 const char *session_dictionary_name, 193 const lldb::DebuggerSP debugger_sp); 194 195 extern "C" void *LLDBSwigPythonCreateScriptedThreadPlan( 196 const char *python_class_name, const char *session_dictionary_name, 197 const lldb::ThreadPlanSP &thread_plan_sp); 198 199 extern "C" bool LLDBSWIGPythonCallThreadPlan(void *implementor, 200 const char *method_name, 201 Event *event_sp, bool &got_error); 202 203 extern "C" void *LLDBSwigPythonCreateScriptedBreakpointResolver( 204 const char *python_class_name, 205 const char *session_dictionary_name, 206 lldb_private::StructuredDataImpl *args, 207 lldb::BreakpointSP &bkpt_sp); 208 209 extern "C" unsigned int LLDBSwigPythonCallBreakpointResolver( 210 void *implementor, 211 const char *method_name, 212 lldb_private::SymbolContext *sym_ctx 213 ); 214 215 extern "C" size_t LLDBSwigPython_CalculateNumChildren(void *implementor, 216 uint32_t max); 217 218 extern "C" void *LLDBSwigPython_GetChildAtIndex(void *implementor, 219 uint32_t idx); 220 221 extern "C" int LLDBSwigPython_GetIndexOfChildWithName(void *implementor, 222 const char *child_name); 223 224 extern "C" void *LLDBSWIGPython_CastPyObjectToSBValue(void *data); 225 226 extern lldb::ValueObjectSP 227 LLDBSWIGPython_GetValueObjectSPFromSBValue(void *data); 228 229 extern "C" bool LLDBSwigPython_UpdateSynthProviderInstance(void *implementor); 230 231 extern "C" bool 232 LLDBSwigPython_MightHaveChildrenSynthProviderInstance(void *implementor); 233 234 extern "C" void * 235 LLDBSwigPython_GetValueSynthProviderInstance(void *implementor); 236 237 extern "C" bool 238 LLDBSwigPythonCallCommand(const char *python_function_name, 239 const char *session_dictionary_name, 240 lldb::DebuggerSP &debugger, const char *args, 241 lldb_private::CommandReturnObject &cmd_retobj, 242 lldb::ExecutionContextRefSP exe_ctx_ref_sp); 243 244 extern "C" bool 245 LLDBSwigPythonCallCommandObject(void *implementor, lldb::DebuggerSP &debugger, 246 const char *args, 247 lldb_private::CommandReturnObject &cmd_retobj, 248 lldb::ExecutionContextRefSP exe_ctx_ref_sp); 249 250 extern "C" bool 251 LLDBSwigPythonCallModuleInit(const char *python_module_name, 252 const char *session_dictionary_name, 253 lldb::DebuggerSP &debugger); 254 255 extern "C" void * 256 LLDBSWIGPythonCreateOSPlugin(const char *python_class_name, 257 const char *session_dictionary_name, 258 const lldb::ProcessSP &process_sp); 259 260 extern "C" void *LLDBSWIGPython_CreateFrameRecognizer( 261 const char *python_class_name, 262 const char *session_dictionary_name); 263 264 extern "C" void *LLDBSwigPython_GetRecognizedArguments(void *implementor, 265 const lldb::StackFrameSP& frame_sp); 266 267 extern "C" bool LLDBSWIGPythonRunScriptKeywordProcess( 268 const char *python_function_name, const char *session_dictionary_name, 269 lldb::ProcessSP &process, std::string &output); 270 271 extern "C" bool LLDBSWIGPythonRunScriptKeywordThread( 272 const char *python_function_name, const char *session_dictionary_name, 273 lldb::ThreadSP &thread, std::string &output); 274 275 extern "C" bool LLDBSWIGPythonRunScriptKeywordTarget( 276 const char *python_function_name, const char *session_dictionary_name, 277 lldb::TargetSP &target, std::string &output); 278 279 extern "C" bool LLDBSWIGPythonRunScriptKeywordFrame( 280 const char *python_function_name, const char *session_dictionary_name, 281 lldb::StackFrameSP &frame, std::string &output); 282 283 extern "C" bool LLDBSWIGPythonRunScriptKeywordValue( 284 const char *python_function_name, const char *session_dictionary_name, 285 lldb::ValueObjectSP &value, std::string &output); 286 287 extern "C" void * 288 LLDBSWIGPython_GetDynamicSetting(void *module, const char *setting, 289 const lldb::TargetSP &target_sp); 290 291 #endif 292 293 SystemInitializerFull::SystemInitializerFull() {} 294 295 SystemInitializerFull::~SystemInitializerFull() {} 296 297 llvm::Error 298 SystemInitializerFull::Initialize(const InitializerOptions &options) { 299 if (auto e = SystemInitializerCommon::Initialize(options)) 300 return e; 301 302 breakpad::ObjectFileBreakpad::Initialize(); 303 ObjectFileELF::Initialize(); 304 #ifdef LLDB_ENABLE_ALL 305 ObjectFileMachO::Initialize(); 306 ObjectFilePECOFF::Initialize(); 307 #endif // LLDB_ENABLE_ALL 308 309 ScriptInterpreterNone::Initialize(); 310 311 #ifndef LLDB_DISABLE_PYTHON 312 OperatingSystemPython::Initialize(); 313 #endif 314 315 #if !defined(LLDB_DISABLE_PYTHON) 316 InitializeSWIG(); 317 318 // ScriptInterpreterPython::Initialize() depends on things like HostInfo 319 // being initialized so it can compute the python directory etc, so we need 320 // to do this after SystemInitializerCommon::Initialize(). 321 ScriptInterpreterPython::Initialize(); 322 #endif 323 324 platform_freebsd::PlatformFreeBSD::Initialize(); 325 #ifdef LLDB_ENABLE_ALL 326 platform_linux::PlatformLinux::Initialize(); 327 platform_netbsd::PlatformNetBSD::Initialize(); 328 platform_openbsd::PlatformOpenBSD::Initialize(); 329 PlatformWindows::Initialize(); 330 PlatformKalimba::Initialize(); 331 platform_android::PlatformAndroid::Initialize(); 332 PlatformRemoteiOS::Initialize(); 333 PlatformMacOSX::Initialize(); 334 #endif // LLDB_ENABLE_ALL 335 #if defined(__APPLE__) 336 PlatformiOSSimulator::Initialize(); 337 PlatformDarwinKernel::Initialize(); 338 #endif 339 340 // Initialize LLVM and Clang 341 llvm::InitializeAllTargets(); 342 llvm::InitializeAllAsmPrinters(); 343 llvm::InitializeAllTargetMCs(); 344 llvm::InitializeAllDisassemblers(); 345 346 ClangASTContext::Initialize(); 347 348 #ifdef LLDB_ENABLE_ALL 349 ABIMacOSX_i386::Initialize(); 350 ABIMacOSX_arm::Initialize(); 351 ABIMacOSX_arm64::Initialize(); 352 #endif // LLDB_ENABLE_ALL 353 ABISysV_arm::Initialize(); 354 ABISysV_arm64::Initialize(); 355 #ifdef LLDB_ENABLE_ALL 356 ABISysV_hexagon::Initialize(); 357 #endif // LLDB_ENABLE_ALL 358 ABISysV_i386::Initialize(); 359 ABISysV_x86_64::Initialize(); 360 ABISysV_ppc::Initialize(); 361 ABISysV_ppc64::Initialize(); 362 ABISysV_mips::Initialize(); 363 ABISysV_mips64::Initialize(); 364 #ifdef LLDB_ENABLE_ALL 365 ABISysV_s390x::Initialize(); 366 #endif // LLDB_ENABLE_ALL 367 368 ArchitectureArm::Initialize(); 369 ArchitectureMips::Initialize(); 370 ArchitecturePPC64::Initialize(); 371 372 DisassemblerLLVMC::Initialize(); 373 374 JITLoaderGDB::Initialize(); 375 ProcessElfCore::Initialize(); 376 #ifdef LLDB_ENABLE_ALL 377 ProcessMachCore::Initialize(); 378 minidump::ProcessMinidump::Initialize(); 379 #endif // LLDB_ENABLE_ALL 380 MemoryHistoryASan::Initialize(); 381 AddressSanitizerRuntime::Initialize(); 382 #ifdef LLDB_ENABLE_ALL 383 ThreadSanitizerRuntime::Initialize(); 384 #endif // LLDB_ENABLE_ALL 385 UndefinedBehaviorSanitizerRuntime::Initialize(); 386 MainThreadCheckerRuntime::Initialize(); 387 388 SymbolVendorELF::Initialize(); 389 breakpad::SymbolFileBreakpad::Initialize(); 390 SymbolFileDWARF::Initialize(); 391 #ifdef LLDB_ENABLE_ALL 392 SymbolFilePDB::Initialize(); 393 #endif // LLDB_ENABLE_ALL 394 SymbolFileSymtab::Initialize(); 395 UnwindAssemblyInstEmulation::Initialize(); 396 UnwindAssembly_x86::Initialize(); 397 EmulateInstructionARM64::Initialize(); 398 EmulateInstructionPPC64::Initialize(); 399 SymbolFileDWARFDebugMap::Initialize(); 400 ItaniumABILanguageRuntime::Initialize(); 401 #ifdef LLDB_ENABLE_ALL 402 AppleObjCRuntimeV2::Initialize(); 403 AppleObjCRuntimeV1::Initialize(); 404 SystemRuntimeMacOSX::Initialize(); 405 RenderScriptRuntime::Initialize(); 406 #endif // LLDB_ENABLE_ALL 407 408 CPlusPlusLanguage::Initialize(); 409 #ifdef LLDB_ENABLE_ALL 410 ObjCLanguage::Initialize(); 411 ObjCPlusPlusLanguage::Initialize(); 412 #endif // LLDB_ENABLE_ALL 413 414 #if defined(_WIN32) 415 ProcessWindows::Initialize(); 416 #endif 417 #if defined(__FreeBSD__) 418 ProcessFreeBSD::Initialize(); 419 #endif 420 #if defined(__APPLE__) 421 SymbolVendorMacOSX::Initialize(); 422 ProcessKDP::Initialize(); 423 PlatformAppleTVSimulator::Initialize(); 424 PlatformAppleWatchSimulator::Initialize(); 425 PlatformRemoteAppleTV::Initialize(); 426 PlatformRemoteAppleWatch::Initialize(); 427 PlatformRemoteAppleBridge::Initialize(); 428 DynamicLoaderDarwinKernel::Initialize(); 429 #endif 430 431 // This plugin is valid on any host that talks to a Darwin remote. It 432 // shouldn't be limited to __APPLE__. 433 #ifdef LLDB_ENABLE_ALL 434 StructuredDataDarwinLog::Initialize(); 435 #endif // LLDB_ENABLE_ALL 436 437 //---------------------------------------------------------------------- 438 // Platform agnostic plugins 439 //---------------------------------------------------------------------- 440 platform_gdb_server::PlatformRemoteGDBServer::Initialize(); 441 442 process_gdb_remote::ProcessGDBRemote::Initialize(); 443 #ifdef LLDB_ENABLE_ALL 444 DynamicLoaderMacOSXDYLD::Initialize(); 445 DynamicLoaderMacOS::Initialize(); 446 #endif // LLDB_ENABLE_ALL 447 DynamicLoaderPOSIXDYLD::Initialize(); 448 DynamicLoaderStatic::Initialize(); 449 #ifdef LLDB_ENABLE_ALL 450 DynamicLoaderWindowsDYLD::Initialize(); 451 #endif // LLDB_ENABLE_ALL 452 453 // Scan for any system or user LLDB plug-ins 454 PluginManager::Initialize(); 455 456 // The process settings need to know about installed plug-ins, so the 457 // Settings must be initialized 458 // AFTER PluginManager::Initialize is called. 459 460 Debugger::SettingsInitialize(); 461 462 return llvm::Error::success(); 463 } 464 465 void SystemInitializerFull::InitializeSWIG() { 466 #if !defined(LLDB_DISABLE_PYTHON) 467 ScriptInterpreterPython::InitializeInterpreter( 468 LLDBSwigPyInit, LLDBSwigPythonBreakpointCallbackFunction, 469 LLDBSwigPythonWatchpointCallbackFunction, LLDBSwigPythonCallTypeScript, 470 LLDBSwigPythonCreateSyntheticProvider, LLDBSwigPythonCreateCommandObject, 471 LLDBSwigPython_CalculateNumChildren, LLDBSwigPython_GetChildAtIndex, 472 LLDBSwigPython_GetIndexOfChildWithName, 473 LLDBSWIGPython_CastPyObjectToSBValue, 474 LLDBSWIGPython_GetValueObjectSPFromSBValue, 475 LLDBSwigPython_UpdateSynthProviderInstance, 476 LLDBSwigPython_MightHaveChildrenSynthProviderInstance, 477 LLDBSwigPython_GetValueSynthProviderInstance, LLDBSwigPythonCallCommand, 478 LLDBSwigPythonCallCommandObject, LLDBSwigPythonCallModuleInit, 479 LLDBSWIGPythonCreateOSPlugin, LLDBSWIGPython_CreateFrameRecognizer, 480 LLDBSwigPython_GetRecognizedArguments, 481 LLDBSWIGPythonRunScriptKeywordProcess, 482 LLDBSWIGPythonRunScriptKeywordThread, 483 LLDBSWIGPythonRunScriptKeywordTarget, LLDBSWIGPythonRunScriptKeywordFrame, 484 LLDBSWIGPythonRunScriptKeywordValue, LLDBSWIGPython_GetDynamicSetting, 485 LLDBSwigPythonCreateScriptedThreadPlan, LLDBSWIGPythonCallThreadPlan, 486 LLDBSwigPythonCreateScriptedBreakpointResolver, LLDBSwigPythonCallBreakpointResolver); 487 #endif 488 } 489 490 void SystemInitializerFull::Terminate() { 491 static Timer::Category func_cat(LLVM_PRETTY_FUNCTION); 492 Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION); 493 494 Debugger::SettingsTerminate(); 495 496 // Terminate and unload and loaded system or user LLDB plug-ins 497 PluginManager::Terminate(); 498 499 ClangASTContext::Terminate(); 500 501 #ifdef LLDB_ENABLE_ALL 502 ArchitectureArm::Terminate(); 503 ArchitectureMips::Terminate(); 504 ArchitecturePPC64::Terminate(); 505 506 ABIMacOSX_i386::Terminate(); 507 ABIMacOSX_arm::Terminate(); 508 ABIMacOSX_arm64::Terminate(); 509 #endif // LLDB_ENABLE_ALL 510 ABISysV_arm::Terminate(); 511 ABISysV_arm64::Terminate(); 512 #ifdef LLDB_ENABLE_ALL 513 ABISysV_hexagon::Terminate(); 514 #endif // LLDB_ENABLE_ALL 515 ABISysV_i386::Terminate(); 516 ABISysV_x86_64::Terminate(); 517 ABISysV_ppc::Terminate(); 518 ABISysV_ppc64::Terminate(); 519 ABISysV_mips::Terminate(); 520 ABISysV_mips64::Terminate(); 521 #ifdef LLDB_ENABLE_ALL 522 ABISysV_s390x::Terminate(); 523 #endif // LLDB_ENABLE_ALL 524 DisassemblerLLVMC::Terminate(); 525 526 JITLoaderGDB::Terminate(); 527 ProcessElfCore::Terminate(); 528 #ifdef LLDB_ENABLE_ALL 529 ProcessMachCore::Terminate(); 530 minidump::ProcessMinidump::Terminate(); 531 #endif // LLDB_ENABLE_ALL 532 MemoryHistoryASan::Terminate(); 533 AddressSanitizerRuntime::Terminate(); 534 #ifdef LLDB_ENABLE_ALL 535 ThreadSanitizerRuntime::Terminate(); 536 #endif // LLDB_ENABLE_ALL 537 UndefinedBehaviorSanitizerRuntime::Terminate(); 538 MainThreadCheckerRuntime::Terminate(); 539 SymbolVendorELF::Terminate(); 540 breakpad::SymbolFileBreakpad::Terminate(); 541 SymbolFileDWARF::Terminate(); 542 #ifdef LLDB_ENABLE_ALL 543 SymbolFilePDB::Terminate(); 544 #endif // LLDB_ENABLE_ALL 545 SymbolFileSymtab::Terminate(); 546 UnwindAssembly_x86::Terminate(); 547 UnwindAssemblyInstEmulation::Terminate(); 548 EmulateInstructionARM64::Terminate(); 549 EmulateInstructionPPC64::Terminate(); 550 SymbolFileDWARFDebugMap::Terminate(); 551 ItaniumABILanguageRuntime::Terminate(); 552 #ifdef LLDB_ENABLE_ALL 553 AppleObjCRuntimeV2::Terminate(); 554 AppleObjCRuntimeV1::Terminate(); 555 SystemRuntimeMacOSX::Terminate(); 556 RenderScriptRuntime::Terminate(); 557 #endif // LLDB_ENABLE_ALL 558 559 CPlusPlusLanguage::Terminate(); 560 #ifdef LLDB_ENABLE_ALL 561 ObjCLanguage::Terminate(); 562 ObjCPlusPlusLanguage::Terminate(); 563 #endif // LLDB_ENABLE_ALL 564 565 #if defined(__APPLE__) 566 DynamicLoaderDarwinKernel::Terminate(); 567 ProcessKDP::Terminate(); 568 SymbolVendorMacOSX::Terminate(); 569 PlatformAppleTVSimulator::Terminate(); 570 PlatformAppleWatchSimulator::Terminate(); 571 PlatformRemoteAppleTV::Terminate(); 572 PlatformRemoteAppleWatch::Terminate(); 573 PlatformRemoteAppleBridge::Terminate(); 574 #endif 575 576 #if defined(__FreeBSD__) 577 ProcessFreeBSD::Terminate(); 578 #endif 579 Debugger::SettingsTerminate(); 580 581 platform_gdb_server::PlatformRemoteGDBServer::Terminate(); 582 process_gdb_remote::ProcessGDBRemote::Terminate(); 583 #ifdef LLDB_ENABLE_ALL 584 StructuredDataDarwinLog::Terminate(); 585 586 DynamicLoaderMacOSXDYLD::Terminate(); 587 DynamicLoaderMacOS::Terminate(); 588 #endif // LLDB_ENABLE_ALL 589 DynamicLoaderPOSIXDYLD::Terminate(); 590 DynamicLoaderStatic::Terminate(); 591 #ifdef LLDB_ENABLE_ALL 592 DynamicLoaderWindowsDYLD::Terminate(); 593 #endif // LLDB_ENABLE_ALL 594 595 #ifndef LLDB_DISABLE_PYTHON 596 OperatingSystemPython::Terminate(); 597 #endif 598 599 platform_freebsd::PlatformFreeBSD::Terminate(); 600 #ifdef LLDB_ENABLE_ALL 601 platform_linux::PlatformLinux::Terminate(); 602 platform_netbsd::PlatformNetBSD::Terminate(); 603 platform_openbsd::PlatformOpenBSD::Terminate(); 604 PlatformWindows::Terminate(); 605 PlatformKalimba::Terminate(); 606 platform_android::PlatformAndroid::Terminate(); 607 PlatformMacOSX::Terminate(); 608 PlatformRemoteiOS::Terminate(); 609 #endif // LLDB_ENABLE_ALL 610 #if defined(__APPLE__) 611 PlatformiOSSimulator::Terminate(); 612 PlatformDarwinKernel::Terminate(); 613 #endif 614 615 breakpad::ObjectFileBreakpad::Terminate(); 616 ObjectFileELF::Terminate(); 617 #ifdef LLDB_ENABLE_ALL 618 ObjectFileMachO::Terminate(); 619 ObjectFilePECOFF::Terminate(); 620 #endif // LLDB_ENABLE_ALL 621 622 // Now shutdown the common parts, in reverse order. 623 SystemInitializerCommon::Terminate(); 624 } 625