forked from OSchip/llvm-project
[lldb/CMake] Auto-generate the Initialize and Terminate calls for plugin
This patch changes the way we initialize and terminate the plugins in the system initializer. It uses an approach similar to LLVM's TARGETS_TO_BUILD with a def file that enumerates the plugins. Differential revision: https://reviews.llvm.org/D73067
This commit is contained in:
parent
8f95a82bc0
commit
7d6da329de
|
@ -22,12 +22,15 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#define LLDB_PLUGIN_DEFINE(PluginName) \
|
||||
#define LLDB_PLUGIN_DEFINE_ADV(ClassName, PluginName) \
|
||||
namespace lldb_private { \
|
||||
void lldb_initialize_##PluginName() { PluginName::Initialize(); } \
|
||||
void lldb_terminate_##PluginName() { PluginName::Terminate(); } \
|
||||
void lldb_initialize_##PluginName() { ClassName::Initialize(); } \
|
||||
void lldb_terminate_##PluginName() { ClassName::Terminate(); } \
|
||||
}
|
||||
|
||||
#define LLDB_PLUGIN_DEFINE(PluginName) \
|
||||
LLDB_PLUGIN_DEFINE_ADV(PluginName, PluginName)
|
||||
|
||||
// FIXME: Generate me with CMake
|
||||
#define LLDB_PLUGIN_DECLARE(PluginName) \
|
||||
namespace lldb_private { \
|
||||
|
|
|
@ -24,89 +24,8 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
LLDB_PLUGIN_DECLARE(ABIAArch64)
|
||||
LLDB_PLUGIN_DECLARE(ABIARM)
|
||||
LLDB_PLUGIN_DECLARE(ABISysV_arc)
|
||||
LLDB_PLUGIN_DECLARE(ABISysV_hexagon)
|
||||
LLDB_PLUGIN_DECLARE(ABIMips)
|
||||
LLDB_PLUGIN_DECLARE(ABIPowerPC)
|
||||
LLDB_PLUGIN_DECLARE(ABISysV_s390x)
|
||||
LLDB_PLUGIN_DECLARE(ABIX86)
|
||||
LLDB_PLUGIN_DECLARE(ObjectFileBreakpad)
|
||||
LLDB_PLUGIN_DECLARE(ObjectFileELF)
|
||||
LLDB_PLUGIN_DECLARE(ObjectFileMachO)
|
||||
LLDB_PLUGIN_DECLARE(ObjectFilePECOFF)
|
||||
LLDB_PLUGIN_DECLARE(ObjectFileWasm)
|
||||
LLDB_PLUGIN_DECLARE(ObjectContainerBSDArchive)
|
||||
LLDB_PLUGIN_DECLARE(ObjectContainerUniversalMachO)
|
||||
LLDB_PLUGIN_DECLARE(ScriptInterpreterNone)
|
||||
#if LLDB_ENABLE_PYTHON
|
||||
LLDB_PLUGIN_DECLARE(OperatingSystemPython)
|
||||
LLDB_PLUGIN_DECLARE(ScriptInterpreterPython)
|
||||
#endif
|
||||
#if LLDB_ENABLE_LUA
|
||||
LLDB_PLUGIN_DECLARE(ScriptInterpreterLua)
|
||||
#endif
|
||||
LLDB_PLUGIN_DECLARE(PlatformFreeBSD)
|
||||
LLDB_PLUGIN_DECLARE(PlatformLinux)
|
||||
LLDB_PLUGIN_DECLARE(PlatformNetBSD)
|
||||
LLDB_PLUGIN_DECLARE(PlatformOpenBSD)
|
||||
LLDB_PLUGIN_DECLARE(PlatformWindows)
|
||||
LLDB_PLUGIN_DECLARE(PlatformAndroid)
|
||||
LLDB_PLUGIN_DECLARE(PlatformMacOSX)
|
||||
LLDB_PLUGIN_DECLARE(TypeSystemClang)
|
||||
LLDB_PLUGIN_DECLARE(ArchitectureArm)
|
||||
LLDB_PLUGIN_DECLARE(ArchitectureMips)
|
||||
LLDB_PLUGIN_DECLARE(ArchitecturePPC64)
|
||||
LLDB_PLUGIN_DECLARE(DisassemblerLLVMC)
|
||||
LLDB_PLUGIN_DECLARE(JITLoaderGDB)
|
||||
LLDB_PLUGIN_DECLARE(ProcessElfCore)
|
||||
LLDB_PLUGIN_DECLARE(ProcessMachCore)
|
||||
LLDB_PLUGIN_DECLARE(ProcessMinidump)
|
||||
LLDB_PLUGIN_DECLARE(MemoryHistoryASan)
|
||||
LLDB_PLUGIN_DECLARE(InstrumentationRuntimeASan)
|
||||
LLDB_PLUGIN_DECLARE(InstrumentationRuntimeTSan)
|
||||
LLDB_PLUGIN_DECLARE(InstrumentationRuntimeUBSan)
|
||||
LLDB_PLUGIN_DECLARE(InstrumentationRuntimeMainThreadChecker)
|
||||
LLDB_PLUGIN_DECLARE(SymbolVendorELF)
|
||||
LLDB_PLUGIN_DECLARE(SymbolFileBreakpad)
|
||||
LLDB_PLUGIN_DECLARE(SymbolFileDWARF)
|
||||
LLDB_PLUGIN_DECLARE(SymbolFilePDB)
|
||||
LLDB_PLUGIN_DECLARE(SymbolFileSymtab)
|
||||
LLDB_PLUGIN_DECLARE(SymbolVendorWasm)
|
||||
LLDB_PLUGIN_DECLARE(UnwindAssemblyInstEmulation)
|
||||
LLDB_PLUGIN_DECLARE(UnwindAssembly_x86)
|
||||
LLDB_PLUGIN_DECLARE(EmulateInstructionARM)
|
||||
LLDB_PLUGIN_DECLARE(EmulateInstructionARM64)
|
||||
LLDB_PLUGIN_DECLARE(EmulateInstructionMIPS)
|
||||
LLDB_PLUGIN_DECLARE(EmulateInstructionMIPS64)
|
||||
LLDB_PLUGIN_DECLARE(EmulateInstructionPPC64)
|
||||
LLDB_PLUGIN_DECLARE(ItaniumABILanguageRuntime)
|
||||
LLDB_PLUGIN_DECLARE(AppleObjCRuntime)
|
||||
LLDB_PLUGIN_DECLARE(SystemRuntimeMacOSX)
|
||||
LLDB_PLUGIN_DECLARE(RenderScriptRuntime)
|
||||
LLDB_PLUGIN_DECLARE(CPlusPlusLanguage)
|
||||
LLDB_PLUGIN_DECLARE(ObjCLanguage)
|
||||
LLDB_PLUGIN_DECLARE(ObjCPlusPlusLanguage)
|
||||
#if defined(_WIN32)
|
||||
LLDB_PLUGIN_DECLARE(ProcessWindows)
|
||||
#endif
|
||||
#if defined(__FreeBSD__)
|
||||
LLDB_PLUGIN_DECLARE(ProcessFreeBSD)
|
||||
#endif
|
||||
#if defined(__APPLE__)
|
||||
LLDB_PLUGIN_DECLARE(SymbolVendorMacOSX)
|
||||
LLDB_PLUGIN_DECLARE(ProcessKDP)
|
||||
LLDB_PLUGIN_DECLARE(DynamicLoaderDarwinKernel)
|
||||
#endif
|
||||
LLDB_PLUGIN_DECLARE(StructuredDataDarwinLog)
|
||||
LLDB_PLUGIN_DECLARE(PlatformRemoteGDBServer)
|
||||
LLDB_PLUGIN_DECLARE(ProcessGDBRemote)
|
||||
LLDB_PLUGIN_DECLARE(DynamicLoaderMacOSXDYLD)
|
||||
LLDB_PLUGIN_DECLARE(DynamicLoaderPOSIXDYLD)
|
||||
LLDB_PLUGIN_DECLARE(DynamicLoaderStatic)
|
||||
LLDB_PLUGIN_DECLARE(DynamicLoaderWasmDYLD)
|
||||
LLDB_PLUGIN_DECLARE(DynamicLoaderWindowsDYLD)
|
||||
#define LLDB_PLUGIN(p) LLDB_PLUGIN_DECLARE(p)
|
||||
#include "Plugins/Plugins.def"
|
||||
|
||||
using namespace lldb_private;
|
||||
|
||||
|
@ -114,144 +33,24 @@ SystemInitializerFull::SystemInitializerFull() {}
|
|||
|
||||
SystemInitializerFull::~SystemInitializerFull() {}
|
||||
|
||||
#define LLDB_PROCESS_AArch64(op) op(ABIAArch64);
|
||||
#define LLDB_PROCESS_ARM(op) op(ABIARM);
|
||||
#define LLDB_PROCESS_ARC(op) op(ABISysV_arc);
|
||||
#define LLDB_PROCESS_Hexagon(op) op(ABISysV_hexagon);
|
||||
#define LLDB_PROCESS_Mips(op) op(ABIMips);
|
||||
#define LLDB_PROCESS_PowerPC(op) op(ABIPowerPC);
|
||||
#define LLDB_PROCESS_SystemZ(op) op(ABISysV_s390x);
|
||||
#define LLDB_PROCESS_X86(op) op(ABIX86);
|
||||
|
||||
#define LLDB_PROCESS_AMDGPU(op)
|
||||
#define LLDB_PROCESS_AVR(op)
|
||||
#define LLDB_PROCESS_BPF(op)
|
||||
#define LLDB_PROCESS_Lanai(op)
|
||||
#define LLDB_PROCESS_MSP430(op)
|
||||
#define LLDB_PROCESS_NVPTX(op)
|
||||
#define LLDB_PROCESS_RISCV(op)
|
||||
#define LLDB_PROCESS_Sparc(op)
|
||||
#define LLDB_PROCESS_WebAssembly(op)
|
||||
#define LLDB_PROCESS_XCore(op)
|
||||
|
||||
llvm::Error SystemInitializerFull::Initialize() {
|
||||
if (auto e = SystemInitializerCommon::Initialize())
|
||||
return e;
|
||||
|
||||
LLDB_PLUGIN_INITIALIZE(ObjectFileBreakpad);
|
||||
LLDB_PLUGIN_INITIALIZE(ObjectFileELF);
|
||||
LLDB_PLUGIN_INITIALIZE(ObjectFileMachO);
|
||||
LLDB_PLUGIN_INITIALIZE(ObjectFilePECOFF);
|
||||
LLDB_PLUGIN_INITIALIZE(ObjectFileWasm);
|
||||
|
||||
LLDB_PLUGIN_INITIALIZE(ObjectContainerBSDArchive);
|
||||
LLDB_PLUGIN_INITIALIZE(ObjectContainerUniversalMachO);
|
||||
|
||||
LLDB_PLUGIN_INITIALIZE(ScriptInterpreterNone);
|
||||
|
||||
#if LLDB_ENABLE_PYTHON
|
||||
LLDB_PLUGIN_INITIALIZE(OperatingSystemPython);
|
||||
#endif
|
||||
|
||||
#if LLDB_ENABLE_PYTHON
|
||||
LLDB_PLUGIN_INITIALIZE(ScriptInterpreterPython);
|
||||
#endif
|
||||
|
||||
#if LLDB_ENABLE_LUA
|
||||
LLDB_PLUGIN_INITIALIZE(ScriptInterpreterLua);
|
||||
#endif
|
||||
LLDB_PLUGIN_INITIALIZE(PlatformFreeBSD);
|
||||
LLDB_PLUGIN_INITIALIZE(PlatformLinux);
|
||||
LLDB_PLUGIN_INITIALIZE(PlatformNetBSD);
|
||||
LLDB_PLUGIN_INITIALIZE(PlatformOpenBSD);
|
||||
LLDB_PLUGIN_INITIALIZE(PlatformWindows);
|
||||
LLDB_PLUGIN_INITIALIZE(PlatformAndroid);
|
||||
LLDB_PLUGIN_INITIALIZE(PlatformMacOSX);
|
||||
|
||||
// Initialize LLVM and Clang
|
||||
llvm::InitializeAllTargets();
|
||||
llvm::InitializeAllAsmPrinters();
|
||||
llvm::InitializeAllTargetMCs();
|
||||
llvm::InitializeAllDisassemblers();
|
||||
|
||||
LLDB_PLUGIN_INITIALIZE(TypeSystemClang);
|
||||
#define LLDB_PLUGIN(p) LLDB_PLUGIN_INITIALIZE(p);
|
||||
#include "Plugins/Plugins.def"
|
||||
|
||||
#define LLVM_TARGET(t) LLDB_PROCESS_##t(LLDB_PLUGIN_INITIALIZE)
|
||||
#include "llvm/Config/Targets.def"
|
||||
|
||||
LLDB_PLUGIN_INITIALIZE(ArchitectureArm);
|
||||
LLDB_PLUGIN_INITIALIZE(ArchitectureMips);
|
||||
LLDB_PLUGIN_INITIALIZE(ArchitecturePPC64);
|
||||
|
||||
LLDB_PLUGIN_INITIALIZE(DisassemblerLLVMC);
|
||||
|
||||
LLDB_PLUGIN_INITIALIZE(JITLoaderGDB);
|
||||
LLDB_PLUGIN_INITIALIZE(ProcessElfCore);
|
||||
LLDB_PLUGIN_INITIALIZE(ProcessMachCore);
|
||||
LLDB_PLUGIN_INITIALIZE(ProcessMinidump);
|
||||
LLDB_PLUGIN_INITIALIZE(MemoryHistoryASan);
|
||||
LLDB_PLUGIN_INITIALIZE(InstrumentationRuntimeASan);
|
||||
LLDB_PLUGIN_INITIALIZE(InstrumentationRuntimeTSan);
|
||||
LLDB_PLUGIN_INITIALIZE(InstrumentationRuntimeUBSan);
|
||||
LLDB_PLUGIN_INITIALIZE(InstrumentationRuntimeMainThreadChecker);
|
||||
|
||||
LLDB_PLUGIN_INITIALIZE(SymbolVendorELF);
|
||||
LLDB_PLUGIN_INITIALIZE(SymbolFileBreakpad);
|
||||
LLDB_PLUGIN_INITIALIZE(SymbolFileDWARF);
|
||||
LLDB_PLUGIN_INITIALIZE(SymbolFilePDB);
|
||||
LLDB_PLUGIN_INITIALIZE(SymbolFileSymtab);
|
||||
LLDB_PLUGIN_INITIALIZE(SymbolVendorWasm);
|
||||
LLDB_PLUGIN_INITIALIZE(UnwindAssemblyInstEmulation);
|
||||
LLDB_PLUGIN_INITIALIZE(UnwindAssembly_x86);
|
||||
|
||||
LLDB_PLUGIN_INITIALIZE(EmulateInstructionARM);
|
||||
LLDB_PLUGIN_INITIALIZE(EmulateInstructionARM64);
|
||||
LLDB_PLUGIN_INITIALIZE(EmulateInstructionMIPS);
|
||||
LLDB_PLUGIN_INITIALIZE(EmulateInstructionMIPS64);
|
||||
LLDB_PLUGIN_INITIALIZE(EmulateInstructionPPC64);
|
||||
|
||||
LLDB_PLUGIN_INITIALIZE(ItaniumABILanguageRuntime);
|
||||
LLDB_PLUGIN_INITIALIZE(AppleObjCRuntime);
|
||||
LLDB_PLUGIN_INITIALIZE(SystemRuntimeMacOSX);
|
||||
LLDB_PLUGIN_INITIALIZE(RenderScriptRuntime);
|
||||
|
||||
LLDB_PLUGIN_INITIALIZE(CPlusPlusLanguage);
|
||||
LLDB_PLUGIN_INITIALIZE(ObjCLanguage);
|
||||
LLDB_PLUGIN_INITIALIZE(ObjCPlusPlusLanguage);
|
||||
|
||||
#if defined(_WIN32)
|
||||
LLDB_PLUGIN_INITIALIZE(ProcessWindows);
|
||||
#endif
|
||||
#if defined(__FreeBSD__)
|
||||
LLDB_PLUGIN_INITIALIZE(ProcessFreeBSD);
|
||||
#endif
|
||||
#if defined(__APPLE__)
|
||||
LLDB_PLUGIN_INITIALIZE(SymbolVendorMacOSX);
|
||||
LLDB_PLUGIN_INITIALIZE(ProcessKDP);
|
||||
LLDB_PLUGIN_INITIALIZE(DynamicLoaderDarwinKernel);
|
||||
#endif
|
||||
|
||||
// This plugin is valid on any host that talks to a Darwin remote. It
|
||||
// shouldn't be limited to __APPLE__.
|
||||
LLDB_PLUGIN_INITIALIZE(StructuredDataDarwinLog);
|
||||
|
||||
// Platform agnostic plugins
|
||||
LLDB_PLUGIN_INITIALIZE(PlatformRemoteGDBServer);
|
||||
|
||||
LLDB_PLUGIN_INITIALIZE(ProcessGDBRemote);
|
||||
LLDB_PLUGIN_INITIALIZE(DynamicLoaderMacOSXDYLD);
|
||||
LLDB_PLUGIN_INITIALIZE(DynamicLoaderPOSIXDYLD);
|
||||
LLDB_PLUGIN_INITIALIZE(DynamicLoaderWasmDYLD); // Before DynamicLoaderStatic.
|
||||
LLDB_PLUGIN_INITIALIZE(DynamicLoaderStatic);
|
||||
LLDB_PLUGIN_INITIALIZE(DynamicLoaderWindowsDYLD);
|
||||
|
||||
// Scan for any system or user LLDB plug-ins
|
||||
// Scan for any system or user LLDB plug-ins.
|
||||
PluginManager::Initialize();
|
||||
|
||||
// The process settings need to know about installed plug-ins, so the
|
||||
// Settings must be initialized
|
||||
// AFTER PluginManager::Initialize is called.
|
||||
|
||||
// Settings must be initialized AFTER PluginManager::Initialize is called.
|
||||
Debugger::SettingsInitialize();
|
||||
|
||||
return llvm::Error::success();
|
||||
|
@ -263,106 +62,11 @@ void SystemInitializerFull::Terminate() {
|
|||
|
||||
Debugger::SettingsTerminate();
|
||||
|
||||
// Terminate and unload and loaded system or user LLDB plug-ins
|
||||
// Terminate and unload and loaded system or user LLDB plug-ins.
|
||||
PluginManager::Terminate();
|
||||
|
||||
LLDB_PLUGIN_TERMINATE(TypeSystemClang);
|
||||
|
||||
LLDB_PLUGIN_TERMINATE(ArchitectureArm);
|
||||
LLDB_PLUGIN_TERMINATE(ArchitectureMips);
|
||||
LLDB_PLUGIN_TERMINATE(ArchitecturePPC64);
|
||||
|
||||
#define LLVM_TARGET(t) LLDB_PROCESS_##t(LLDB_PLUGIN_TERMINATE)
|
||||
#include "llvm/Config/Targets.def"
|
||||
|
||||
LLDB_PLUGIN_TERMINATE(DisassemblerLLVMC);
|
||||
|
||||
LLDB_PLUGIN_TERMINATE(JITLoaderGDB);
|
||||
LLDB_PLUGIN_TERMINATE(ProcessElfCore);
|
||||
LLDB_PLUGIN_TERMINATE(ProcessMachCore);
|
||||
LLDB_PLUGIN_TERMINATE(ProcessMinidump);
|
||||
LLDB_PLUGIN_TERMINATE(MemoryHistoryASan);
|
||||
|
||||
LLDB_PLUGIN_TERMINATE(InstrumentationRuntimeASan);
|
||||
LLDB_PLUGIN_TERMINATE(InstrumentationRuntimeTSan);
|
||||
LLDB_PLUGIN_TERMINATE(InstrumentationRuntimeUBSan);
|
||||
LLDB_PLUGIN_TERMINATE(InstrumentationRuntimeMainThreadChecker);
|
||||
|
||||
LLDB_PLUGIN_TERMINATE(SymbolVendorWasm);
|
||||
LLDB_PLUGIN_TERMINATE(SymbolVendorELF);
|
||||
LLDB_PLUGIN_TERMINATE(SymbolFileBreakpad);
|
||||
LLDB_PLUGIN_TERMINATE(SymbolFileDWARF);
|
||||
LLDB_PLUGIN_TERMINATE(SymbolFilePDB);
|
||||
LLDB_PLUGIN_TERMINATE(SymbolFileSymtab);
|
||||
LLDB_PLUGIN_TERMINATE(UnwindAssembly_x86);
|
||||
LLDB_PLUGIN_TERMINATE(UnwindAssemblyInstEmulation);
|
||||
|
||||
LLDB_PLUGIN_TERMINATE(EmulateInstructionARM);
|
||||
LLDB_PLUGIN_TERMINATE(EmulateInstructionARM64);
|
||||
LLDB_PLUGIN_TERMINATE(EmulateInstructionMIPS);
|
||||
LLDB_PLUGIN_TERMINATE(EmulateInstructionMIPS64);
|
||||
LLDB_PLUGIN_TERMINATE(EmulateInstructionPPC64);
|
||||
|
||||
LLDB_PLUGIN_TERMINATE(ItaniumABILanguageRuntime);
|
||||
LLDB_PLUGIN_TERMINATE(AppleObjCRuntime);
|
||||
LLDB_PLUGIN_TERMINATE(SystemRuntimeMacOSX);
|
||||
LLDB_PLUGIN_TERMINATE(RenderScriptRuntime);
|
||||
|
||||
LLDB_PLUGIN_TERMINATE(CPlusPlusLanguage);
|
||||
LLDB_PLUGIN_TERMINATE(ObjCLanguage);
|
||||
LLDB_PLUGIN_TERMINATE(ObjCPlusPlusLanguage);
|
||||
|
||||
#if defined(__APPLE__)
|
||||
LLDB_PLUGIN_TERMINATE(DynamicLoaderDarwinKernel);
|
||||
LLDB_PLUGIN_TERMINATE(ProcessKDP);
|
||||
LLDB_PLUGIN_TERMINATE(SymbolVendorMacOSX);
|
||||
#endif
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
LLDB_PLUGIN_TERMINATE(ProcessFreeBSD);
|
||||
#endif
|
||||
Debugger::SettingsTerminate();
|
||||
|
||||
LLDB_PLUGIN_TERMINATE(PlatformRemoteGDBServer);
|
||||
LLDB_PLUGIN_TERMINATE(ProcessGDBRemote);
|
||||
LLDB_PLUGIN_TERMINATE(StructuredDataDarwinLog);
|
||||
|
||||
LLDB_PLUGIN_TERMINATE(DynamicLoaderMacOSXDYLD);
|
||||
LLDB_PLUGIN_TERMINATE(DynamicLoaderPOSIXDYLD);
|
||||
LLDB_PLUGIN_TERMINATE(DynamicLoaderWasmDYLD);
|
||||
LLDB_PLUGIN_TERMINATE(DynamicLoaderStatic);
|
||||
LLDB_PLUGIN_TERMINATE(DynamicLoaderWindowsDYLD);
|
||||
|
||||
LLDB_PLUGIN_TERMINATE(PlatformFreeBSD);
|
||||
LLDB_PLUGIN_TERMINATE(PlatformLinux);
|
||||
LLDB_PLUGIN_TERMINATE(PlatformNetBSD);
|
||||
LLDB_PLUGIN_TERMINATE(PlatformOpenBSD);
|
||||
LLDB_PLUGIN_TERMINATE(PlatformWindows);
|
||||
LLDB_PLUGIN_TERMINATE(PlatformAndroid);
|
||||
LLDB_PLUGIN_TERMINATE(PlatformMacOSX);
|
||||
|
||||
LLDB_PLUGIN_TERMINATE(ObjectFileBreakpad);
|
||||
LLDB_PLUGIN_TERMINATE(ObjectFileELF);
|
||||
LLDB_PLUGIN_TERMINATE(ObjectFileMachO);
|
||||
LLDB_PLUGIN_TERMINATE(ObjectFilePECOFF);
|
||||
LLDB_PLUGIN_TERMINATE(ObjectFileWasm);
|
||||
|
||||
LLDB_PLUGIN_TERMINATE(ObjectContainerBSDArchive);
|
||||
LLDB_PLUGIN_TERMINATE(ObjectContainerUniversalMachO);
|
||||
|
||||
#if LLDB_ENABLE_PYTHON
|
||||
LLDB_PLUGIN_TERMINATE(OperatingSystemPython);
|
||||
#endif
|
||||
|
||||
#if LLDB_ENABLE_PYTHON
|
||||
LLDB_PLUGIN_TERMINATE(ScriptInterpreterPython);
|
||||
#endif
|
||||
|
||||
#if LLDB_ENABLE_LUA
|
||||
LLDB_PLUGIN_TERMINATE(ScriptInterpreterLua);
|
||||
#endif
|
||||
|
||||
LLDB_PLUGIN_TERMINATE(ScriptInterpreterNone);
|
||||
#define LLDB_PLUGIN(p) LLDB_PLUGIN_TERMINATE(p);
|
||||
#include "Plugins/Plugins.def"
|
||||
|
||||
// Now shutdown the common parts, in reverse order.
|
||||
SystemInitializerCommon::Terminate();
|
||||
|
|
|
@ -1665,7 +1665,7 @@ ABIMacOSX_arm64::CreateInstance(ProcessSP process_sp, const ArchSpec &arch) {
|
|||
const llvm::Triple::VendorType vendor_type = arch.GetTriple().getVendor();
|
||||
|
||||
if (vendor_type == llvm::Triple::Apple) {
|
||||
if (arch_type == llvm::Triple::aarch64 ||
|
||||
if (arch_type == llvm::Triple::aarch64 ||
|
||||
arch_type == llvm::Triple::aarch64_32) {
|
||||
return ABISP(
|
||||
new ABIMacOSX_arm64(std::move(process_sp), MakeMCRegisterInfo(arch)));
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
|
||||
LLDB_PLUGIN_DEFINE(ABISysV_arc)
|
||||
LLDB_PLUGIN_DEFINE_ADV(ABISysV_arc, ABIARC)
|
||||
|
||||
namespace {
|
||||
namespace dwarf {
|
||||
|
@ -146,7 +146,7 @@ size_t ABISysV_arc::GetRedZoneSize() const { return 0; }
|
|||
bool ABISysV_arc::IsRegisterFileReduced(RegisterContext ®_ctx) const {
|
||||
if (!m_is_reg_file_reduced) {
|
||||
const auto *const rf_build_reg = reg_ctx.GetRegisterInfoByName("rf_build");
|
||||
|
||||
|
||||
const auto reg_value = reg_ctx.ReadRegisterAsUnsigned(rf_build_reg,
|
||||
/*fail_value*/ 0);
|
||||
// RF_BUILD "Number of Entries" bit.
|
||||
|
@ -241,7 +241,7 @@ bool ABISysV_arc::PrepareTrivialCall(Thread &thread, addr_t sp, addr_t pc,
|
|||
// Make sure number of parameters matches prototype.
|
||||
assert(!prototype.isFunctionVarArg());
|
||||
assert(prototype.getFunctionNumParams() == args.size());
|
||||
|
||||
|
||||
const size_t regs_for_args_count = IsRegisterFileReduced(*reg_ctx) ? 4U : 8U;
|
||||
|
||||
// Number of arguments passed on stack.
|
||||
|
|
|
@ -34,8 +34,6 @@
|
|||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
|
||||
LLDB_PLUGIN_DEFINE(ABIMacOSX_arm)
|
||||
|
||||
static RegisterInfo g_register_infos[] = {
|
||||
// NAME ALT SZ OFF ENCODING FORMAT EH_FRAME
|
||||
// DWARF GENERIC PROCESS PLUGIN
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
|
||||
LLDB_PLUGIN_DEFINE(ABISysV_hexagon)
|
||||
LLDB_PLUGIN_DEFINE_ADV(ABISysV_hexagon, ABIHexagon)
|
||||
|
||||
static RegisterInfo g_register_infos[] = {
|
||||
// hexagon-core.xml
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
|
||||
LLDB_PLUGIN_DEFINE(ABISysV_s390x)
|
||||
LLDB_PLUGIN_DEFINE_ADV(ABISysV_s390x, ABISystemZ)
|
||||
|
||||
enum dwarf_regnums {
|
||||
// General Purpose Registers
|
||||
|
|
|
@ -21,3 +21,25 @@ add_subdirectory(SystemRuntime)
|
|||
add_subdirectory(SymbolVendor)
|
||||
add_subdirectory(TypeSystem)
|
||||
add_subdirectory(UnwindAssembly)
|
||||
|
||||
set(LLDB_STRIPPED_PLUGINS)
|
||||
get_property(LLDB_ALL_PLUGINS GLOBAL PROPERTY LLDB_PLUGINS)
|
||||
|
||||
set(LLDB_ENUM_PLUGINS "")
|
||||
|
||||
foreach(p ${LLDB_ALL_PLUGINS})
|
||||
# Strip lldbPlugin form the plugin name.
|
||||
string(SUBSTRING ${p} 10 -1 pStripped)
|
||||
if(${pStripped} MATCHES "^ScriptInterpreter*")
|
||||
set(LLDB_ENUM_PLUGINS "${LLDB_ENUM_PLUGINS}LLDB_SCRIPT_PLUGIN(${pStripped})\n")
|
||||
else()
|
||||
set(LLDB_ENUM_PLUGINS "${LLDB_ENUM_PLUGINS}LLDB_PLUGIN(${pStripped})\n")
|
||||
endif()
|
||||
endforeach(p)
|
||||
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Plugins.def.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/Plugins.def
|
||||
)
|
||||
|
||||
set_property(GLOBAL PROPERTY LLDB_PLUGINS_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
add_lldb_library(lldbPluginDisassemblerLLVM PLUGIN
|
||||
add_lldb_library(lldbPluginDisassemblerLLVMC PLUGIN
|
||||
DisassemblerLLVMC.cpp
|
||||
|
||||
LINK_LIBS
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
|
||||
LLDB_PLUGIN_DEFINE(DynamicLoaderHexagonDYLD)
|
||||
|
||||
// Aidan 21/05/2014
|
||||
//
|
||||
// Notes about hexagon dynamic loading:
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
|
||||
LLDB_PLUGIN_DEFINE(DynamicLoaderPOSIXDYLD)
|
||||
LLDB_PLUGIN_DEFINE_ADV(DynamicLoaderPOSIXDYLD, DynamicLoaderPosixDYLD)
|
||||
|
||||
void DynamicLoaderPOSIXDYLD::Initialize() {
|
||||
PluginManager::RegisterPlugin(GetPluginNameStatic(),
|
||||
|
|
|
@ -2,7 +2,7 @@ if(NOT LLDB_BUILT_STANDALONE)
|
|||
set(tablegen_deps intrinsics_gen)
|
||||
endif()
|
||||
|
||||
add_lldb_library(lldbPluginExpressionParserClang PLUGIN
|
||||
add_lldb_library(lldbPluginExpressionParserClang
|
||||
ASTResultSynthesizer.cpp
|
||||
ASTStructExtractor.cpp
|
||||
ASTUtils.cpp
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
|
||||
LLDB_PLUGIN_DEFINE(EmulateInstructionARM)
|
||||
LLDB_PLUGIN_DEFINE_ADV(EmulateInstructionARM, InstructionARM)
|
||||
|
||||
// Convenient macro definitions.
|
||||
#define APSR_C Bit32(m_opcode_cpsr, CPSR_C_POS)
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
|
||||
LLDB_PLUGIN_DEFINE(EmulateInstructionARM64)
|
||||
LLDB_PLUGIN_DEFINE_ADV(EmulateInstructionARM64, InstructionARM64)
|
||||
|
||||
static bool LLDBTableGetRegisterInfo(uint32_t reg_num, RegisterInfo ®_info) {
|
||||
if (reg_num >= llvm::array_lengthof(g_register_infos_arm64_le))
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
|
||||
LLDB_PLUGIN_DEFINE(EmulateInstructionMIPS)
|
||||
LLDB_PLUGIN_DEFINE_ADV(EmulateInstructionMIPS, InstructionMIPS)
|
||||
|
||||
#define UInt(x) ((uint64_t)x)
|
||||
#define integer int64_t
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
|
||||
LLDB_PLUGIN_DEFINE(EmulateInstructionMIPS64)
|
||||
LLDB_PLUGIN_DEFINE_ADV(EmulateInstructionMIPS64, InstructionMIPS64)
|
||||
|
||||
#define UInt(x) ((uint64_t)x)
|
||||
#define integer int64_t
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
|
||||
LLDB_PLUGIN_DEFINE(EmulateInstructionPPC64)
|
||||
LLDB_PLUGIN_DEFINE_ADV(EmulateInstructionPPC64, InstructionPPC64)
|
||||
|
||||
EmulateInstructionPPC64::EmulateInstructionPPC64(const ArchSpec &arch)
|
||||
: EmulateInstruction(arch) {}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
add_lldb_library(lldbPluginClangCommon PLUGIN
|
||||
add_lldb_library(lldbPluginClangCommon
|
||||
ClangHighlighter.cpp
|
||||
|
||||
LINK_LIBS
|
||||
|
|
|
@ -8,7 +8,7 @@ if (CXX_SUPPORTS_NO_NESTED_ANON_TYPES)
|
|||
set(EXTRA_CXXFLAGS ${EXTRA_CXXFLAGS} -Wno-nested-anon-types)
|
||||
endif ()
|
||||
|
||||
add_lldb_library(lldbPluginObjCLanguage PLUGIN
|
||||
add_lldb_library(lldbPluginObjCLanguage
|
||||
ObjCLanguage.cpp
|
||||
CF.cpp
|
||||
Cocoa.cpp
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
add_lldb_library(lldbPluginCPPRuntime PLUGIN
|
||||
add_lldb_library(lldbPluginCPPRuntime
|
||||
CPPLanguageRuntime.cpp
|
||||
|
||||
LINK_LIBS
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
|
||||
LLDB_PLUGIN_DEFINE(ItaniumABILanguageRuntime)
|
||||
LLDB_PLUGIN_DEFINE_ADV(ItaniumABILanguageRuntime, CXXItaniumABI)
|
||||
|
||||
static const char *vtable_demangled_prefix = "vtable for ";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
add_lldb_library(lldbPluginObjCRuntime PLUGIN
|
||||
add_lldb_library(lldbPluginObjCRuntime
|
||||
ObjCLanguageRuntime.cpp
|
||||
|
||||
LINK_LIBS
|
||||
|
|
|
@ -20,7 +20,8 @@ using namespace lldb;
|
|||
using namespace lldb_private;
|
||||
using namespace llvm::MachO;
|
||||
|
||||
LLDB_PLUGIN_DEFINE(ObjectContainerUniversalMachO)
|
||||
LLDB_PLUGIN_DEFINE_ADV(ObjectContainerUniversalMachO,
|
||||
ObjectContainerMachOArchive)
|
||||
|
||||
void ObjectContainerUniversalMachO::Initialize() {
|
||||
PluginManager::RegisterPlugin(GetPluginNameStatic(),
|
||||
|
|
|
@ -39,6 +39,8 @@
|
|||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
|
||||
LLDB_PLUGIN_DEFINE(ObjectFileJIT)
|
||||
|
||||
char ObjectFileJIT::ID;
|
||||
|
||||
void ObjectFileJIT::Initialize() {
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
add_subdirectory(Python)
|
||||
if (LLDB_ENABLE_PYTHON)
|
||||
add_subdirectory(Python)
|
||||
endif()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
add_lldb_library(lldbPluginPlatformPOSIX PLUGIN
|
||||
add_lldb_library(lldbPluginPlatformPOSIX
|
||||
PlatformPOSIX.cpp
|
||||
|
||||
LINK_LIBS
|
||||
|
|
|
@ -35,7 +35,7 @@ using namespace lldb;
|
|||
using namespace lldb_private;
|
||||
using namespace lldb_private::platform_gdb_server;
|
||||
|
||||
LLDB_PLUGIN_DEFINE(PlatformRemoteGDBServer)
|
||||
LLDB_PLUGIN_DEFINE_ADV(PlatformRemoteGDBServer, PlatformGDB)
|
||||
|
||||
static bool g_initialized = false;
|
||||
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
/*===- lldb/source/Plugin/Plugins.def ---------------------------*- C++ -*-===*\
|
||||
|* *|
|
||||
|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
|
||||
|* Exceptions. *|
|
||||
|* See https://llvm.org/LICENSE.txt for license information. *|
|
||||
|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
|
||||
|* *|
|
||||
|*===----------------------------------------------------------------------===*|
|
||||
|* *|
|
||||
|* This file enumerates all of the plugins supported by this build of LLDB. *|
|
||||
|* Clients of this file should define the LLDB_PLUGIN macro to be a *|
|
||||
|* function-like macro with a single parameter (the name of the plugin) *|
|
||||
|* including this file will then enumerate all of the plugins. Script *|
|
||||
|* interpreter plugins can be enumerated separately by defining *|
|
||||
|* LLDB_SCRIPT_PLUGIN in which case they are not part of LLDB_PLUGIN. *|
|
||||
|* *|
|
||||
|* *|
|
||||
|* The set of plugins supported by LLDB is generated at configuration *|
|
||||
|* time, at which point this header is generated. Do not modify this *|
|
||||
|* header directly. *|
|
||||
|* *|
|
||||
\*===----------------------------------------------------------------------===*/
|
||||
|
||||
#ifndef LLDB_PLUGIN
|
||||
# error Please define the macro LLDB_PLUGIN(PluginName)
|
||||
#endif
|
||||
|
||||
#ifndef LLDB_SCRIPT_PLUGIN
|
||||
#define LLDB_SCRIPT_PLUGIN(p) LLDB_PLUGIN(p)
|
||||
#endif
|
||||
|
||||
@LLDB_ENUM_PLUGINS@
|
||||
|
||||
#undef LLDB_PLUGIN
|
||||
#undef LLDB_SCRIPT_PLUGIN
|
|
@ -50,7 +50,7 @@
|
|||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
|
||||
LLDB_PLUGIN_DEFINE(ProcessKDP)
|
||||
LLDB_PLUGIN_DEFINE_ADV(ProcessKDP, ProcessMacOSXKernel)
|
||||
|
||||
namespace {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
add_lldb_library(lldbPluginProcessUtility PLUGIN
|
||||
add_lldb_library(lldbPluginProcessUtility
|
||||
AuxVector.cpp
|
||||
DynamicRegisterInfo.cpp
|
||||
FreeBSDSignals.cpp
|
||||
|
|
|
@ -66,6 +66,8 @@ using namespace npdb;
|
|||
using namespace llvm::codeview;
|
||||
using namespace llvm::pdb;
|
||||
|
||||
LLDB_PLUGIN_DEFINE(SymbolFileNativePDB)
|
||||
|
||||
char SymbolFileNativePDB::ID;
|
||||
|
||||
static lldb::LanguageType TranslateLanguage(PDB_Lang lang) {
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
|
||||
LLDB_PLUGIN_DEFINE(UnwindAssembly_x86)
|
||||
LLDB_PLUGIN_DEFINE_ADV(UnwindAssembly_x86, UnwindAssemblyX86)
|
||||
|
||||
// UnwindAssemblyParser_x86 method definitions
|
||||
|
||||
|
|
|
@ -23,5 +23,6 @@ add_lldb_tool(lldb-test
|
|||
LINK_COMPONENTS
|
||||
Support
|
||||
)
|
||||
|
||||
include_directories(${LLDB_SOURCE_DIR}/source)
|
||||
|
||||
target_include_directories(lldb-test PRIVATE ${LLDB_SOURCE_DIR}/source)
|
||||
target_include_directories(lldb-test PRIVATE ${LLDB_BINARY_DIR}/source)
|
||||
|
|
|
@ -17,82 +17,8 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
LLDB_PLUGIN_DECLARE(ABIAArch64);
|
||||
LLDB_PLUGIN_DECLARE(ABIARM);
|
||||
LLDB_PLUGIN_DECLARE(ABISysV_arc);
|
||||
LLDB_PLUGIN_DECLARE(ABISysV_hexagon);
|
||||
LLDB_PLUGIN_DECLARE(ABIMips);
|
||||
LLDB_PLUGIN_DECLARE(ABIPowerPC);
|
||||
LLDB_PLUGIN_DECLARE(ABISysV_s390x);
|
||||
LLDB_PLUGIN_DECLARE(ABIX86);
|
||||
LLDB_PLUGIN_DECLARE(ObjectFileBreakpad)
|
||||
LLDB_PLUGIN_DECLARE(ObjectFileELF)
|
||||
LLDB_PLUGIN_DECLARE(ObjectFileMachO)
|
||||
LLDB_PLUGIN_DECLARE(ObjectFilePECOFF)
|
||||
LLDB_PLUGIN_DECLARE(ObjectFileWasm)
|
||||
LLDB_PLUGIN_DECLARE(ObjectContainerBSDArchive)
|
||||
LLDB_PLUGIN_DECLARE(ObjectContainerUniversalMachO)
|
||||
LLDB_PLUGIN_DECLARE(ScriptInterpreterNone)
|
||||
LLDB_PLUGIN_DECLARE(PlatformFreeBSD)
|
||||
LLDB_PLUGIN_DECLARE(PlatformLinux)
|
||||
LLDB_PLUGIN_DECLARE(PlatformNetBSD)
|
||||
LLDB_PLUGIN_DECLARE(PlatformOpenBSD)
|
||||
LLDB_PLUGIN_DECLARE(PlatformWindows)
|
||||
LLDB_PLUGIN_DECLARE(PlatformAndroid)
|
||||
LLDB_PLUGIN_DECLARE(PlatformMacOSX)
|
||||
LLDB_PLUGIN_DECLARE(TypeSystemClang)
|
||||
LLDB_PLUGIN_DECLARE(ArchitectureArm)
|
||||
LLDB_PLUGIN_DECLARE(ArchitectureMips)
|
||||
LLDB_PLUGIN_DECLARE(ArchitecturePPC64)
|
||||
LLDB_PLUGIN_DECLARE(DisassemblerLLVMC)
|
||||
LLDB_PLUGIN_DECLARE(JITLoaderGDB)
|
||||
LLDB_PLUGIN_DECLARE(ProcessElfCore)
|
||||
LLDB_PLUGIN_DECLARE(ProcessMachCore)
|
||||
LLDB_PLUGIN_DECLARE(ProcessMinidump)
|
||||
LLDB_PLUGIN_DECLARE(MemoryHistoryASan)
|
||||
LLDB_PLUGIN_DECLARE(InstrumentationRuntimeASan)
|
||||
LLDB_PLUGIN_DECLARE(InstrumentationRuntimeTSan)
|
||||
LLDB_PLUGIN_DECLARE(InstrumentationRuntimeUBSan)
|
||||
LLDB_PLUGIN_DECLARE(InstrumentationRuntimeMainThreadChecker)
|
||||
LLDB_PLUGIN_DECLARE(SymbolVendorELF)
|
||||
LLDB_PLUGIN_DECLARE(SymbolFileBreakpad)
|
||||
LLDB_PLUGIN_DECLARE(SymbolFileDWARF)
|
||||
LLDB_PLUGIN_DECLARE(SymbolFilePDB)
|
||||
LLDB_PLUGIN_DECLARE(SymbolFileSymtab)
|
||||
LLDB_PLUGIN_DECLARE(SymbolVendorWasm)
|
||||
LLDB_PLUGIN_DECLARE(UnwindAssemblyInstEmulation)
|
||||
LLDB_PLUGIN_DECLARE(UnwindAssembly_x86)
|
||||
LLDB_PLUGIN_DECLARE(EmulateInstructionARM)
|
||||
LLDB_PLUGIN_DECLARE(EmulateInstructionARM64)
|
||||
LLDB_PLUGIN_DECLARE(EmulateInstructionMIPS)
|
||||
LLDB_PLUGIN_DECLARE(EmulateInstructionMIPS64)
|
||||
LLDB_PLUGIN_DECLARE(EmulateInstructionPPC64)
|
||||
LLDB_PLUGIN_DECLARE(ItaniumABILanguageRuntime)
|
||||
LLDB_PLUGIN_DECLARE(AppleObjCRuntime)
|
||||
LLDB_PLUGIN_DECLARE(SystemRuntimeMacOSX)
|
||||
LLDB_PLUGIN_DECLARE(RenderScriptRuntime)
|
||||
LLDB_PLUGIN_DECLARE(CPlusPlusLanguage)
|
||||
LLDB_PLUGIN_DECLARE(ObjCLanguage)
|
||||
LLDB_PLUGIN_DECLARE(ObjCPlusPlusLanguage)
|
||||
#if defined(_WIN32)
|
||||
LLDB_PLUGIN_DECLARE(ProcessWindows)
|
||||
#endif
|
||||
#if defined(__FreeBSD__)
|
||||
LLDB_PLUGIN_DECLARE(ProcessFreeBSD)
|
||||
#endif
|
||||
#if defined(__APPLE__)
|
||||
LLDB_PLUGIN_DECLARE(SymbolVendorMacOSX)
|
||||
LLDB_PLUGIN_DECLARE(ProcessKDP)
|
||||
LLDB_PLUGIN_DECLARE(DynamicLoaderDarwinKernel)
|
||||
#endif
|
||||
LLDB_PLUGIN_DECLARE(StructuredDataDarwinLog)
|
||||
LLDB_PLUGIN_DECLARE(PlatformRemoteGDBServer)
|
||||
LLDB_PLUGIN_DECLARE(ProcessGDBRemote)
|
||||
LLDB_PLUGIN_DECLARE(DynamicLoaderMacOSXDYLD)
|
||||
LLDB_PLUGIN_DECLARE(DynamicLoaderPOSIXDYLD)
|
||||
LLDB_PLUGIN_DECLARE(DynamicLoaderStatic)
|
||||
LLDB_PLUGIN_DECLARE(DynamicLoaderWasmDYLD)
|
||||
LLDB_PLUGIN_DECLARE(DynamicLoaderWindowsDYLD)
|
||||
#define LLDB_PLUGIN(p) LLDB_PLUGIN_DECLARE(p)
|
||||
#include "Plugins/Plugins.def"
|
||||
|
||||
using namespace lldb_private;
|
||||
|
||||
|
@ -100,133 +26,25 @@ SystemInitializerTest::SystemInitializerTest() {}
|
|||
|
||||
SystemInitializerTest::~SystemInitializerTest() {}
|
||||
|
||||
#define LLDB_PROCESS_AArch64(op) op(ABIAArch64);
|
||||
#define LLDB_PROCESS_ARM(op) op(ABIARM);
|
||||
#define LLDB_PROCESS_Hexagon(op) op(ABISysV_hexagon);
|
||||
#define LLDB_PROCESS_Mips(op) op(ABIMips);
|
||||
#define LLDB_PROCESS_PowerPC(op) op(ABIPowerPC);
|
||||
#define LLDB_PROCESS_SystemZ(op) op(ABISysV_s390x);
|
||||
#define LLDB_PROCESS_X86(op) op(ABIX86);
|
||||
|
||||
#define LLDB_PROCESS_AMDGPU(op)
|
||||
#define LLDB_PROCESS_ARC(op)
|
||||
#define LLDB_PROCESS_AVR(op)
|
||||
#define LLDB_PROCESS_BPF(op)
|
||||
#define LLDB_PROCESS_Lanai(op)
|
||||
#define LLDB_PROCESS_MSP430(op)
|
||||
#define LLDB_PROCESS_NVPTX(op)
|
||||
#define LLDB_PROCESS_RISCV(op)
|
||||
#define LLDB_PROCESS_Sparc(op)
|
||||
#define LLDB_PROCESS_WebAssembly(op)
|
||||
#define LLDB_PROCESS_XCore(op)
|
||||
|
||||
llvm::Error SystemInitializerTest::Initialize() {
|
||||
if (auto e = SystemInitializerCommon::Initialize())
|
||||
return e;
|
||||
|
||||
LLDB_PLUGIN_INITIALIZE(ObjectFileBreakpad);
|
||||
LLDB_PLUGIN_INITIALIZE(ObjectFileELF);
|
||||
LLDB_PLUGIN_INITIALIZE(ObjectFileMachO);
|
||||
LLDB_PLUGIN_INITIALIZE(ObjectFilePECOFF);
|
||||
LLDB_PLUGIN_INITIALIZE(ObjectFileWasm);
|
||||
|
||||
LLDB_PLUGIN_INITIALIZE(ObjectContainerBSDArchive);
|
||||
LLDB_PLUGIN_INITIALIZE(ObjectContainerUniversalMachO);
|
||||
|
||||
LLDB_PLUGIN_INITIALIZE(ScriptInterpreterNone);
|
||||
|
||||
LLDB_PLUGIN_INITIALIZE(PlatformFreeBSD);
|
||||
LLDB_PLUGIN_INITIALIZE(PlatformLinux);
|
||||
LLDB_PLUGIN_INITIALIZE(PlatformNetBSD);
|
||||
LLDB_PLUGIN_INITIALIZE(PlatformOpenBSD);
|
||||
LLDB_PLUGIN_INITIALIZE(PlatformWindows);
|
||||
LLDB_PLUGIN_INITIALIZE(PlatformAndroid);
|
||||
LLDB_PLUGIN_INITIALIZE(PlatformMacOSX);
|
||||
|
||||
// Initialize LLVM and Clang
|
||||
llvm::InitializeAllTargets();
|
||||
llvm::InitializeAllAsmPrinters();
|
||||
llvm::InitializeAllTargetMCs();
|
||||
llvm::InitializeAllDisassemblers();
|
||||
|
||||
LLDB_PLUGIN_INITIALIZE(TypeSystemClang);
|
||||
#define LLDB_SCRIPT_PLUGIN(p)
|
||||
#define LLDB_PLUGIN(p) LLDB_PLUGIN_INITIALIZE(p);
|
||||
#include "Plugins/Plugins.def"
|
||||
|
||||
#define LLVM_TARGET(t) LLDB_PROCESS_##t(LLDB_PLUGIN_INITIALIZE)
|
||||
#include "llvm/Config/Targets.def"
|
||||
|
||||
LLDB_PLUGIN_INITIALIZE(ArchitectureArm);
|
||||
LLDB_PLUGIN_INITIALIZE(ArchitectureMips);
|
||||
LLDB_PLUGIN_INITIALIZE(ArchitecturePPC64);
|
||||
|
||||
LLDB_PLUGIN_INITIALIZE(DisassemblerLLVMC);
|
||||
|
||||
LLDB_PLUGIN_INITIALIZE(JITLoaderGDB);
|
||||
LLDB_PLUGIN_INITIALIZE(ProcessElfCore);
|
||||
LLDB_PLUGIN_INITIALIZE(ProcessMachCore);
|
||||
LLDB_PLUGIN_INITIALIZE(ProcessMinidump);
|
||||
LLDB_PLUGIN_INITIALIZE(MemoryHistoryASan);
|
||||
LLDB_PLUGIN_INITIALIZE(InstrumentationRuntimeASan);
|
||||
LLDB_PLUGIN_INITIALIZE(InstrumentationRuntimeTSan);
|
||||
LLDB_PLUGIN_INITIALIZE(InstrumentationRuntimeUBSan);
|
||||
LLDB_PLUGIN_INITIALIZE(InstrumentationRuntimeMainThreadChecker);
|
||||
|
||||
LLDB_PLUGIN_INITIALIZE(SymbolVendorELF);
|
||||
LLDB_PLUGIN_INITIALIZE(SymbolFileBreakpad);
|
||||
LLDB_PLUGIN_INITIALIZE(SymbolFileDWARF);
|
||||
LLDB_PLUGIN_INITIALIZE(SymbolFilePDB);
|
||||
LLDB_PLUGIN_INITIALIZE(SymbolFileSymtab);
|
||||
LLDB_PLUGIN_INITIALIZE(SymbolVendorWasm);
|
||||
LLDB_PLUGIN_INITIALIZE(UnwindAssemblyInstEmulation);
|
||||
LLDB_PLUGIN_INITIALIZE(UnwindAssembly_x86);
|
||||
|
||||
LLDB_PLUGIN_INITIALIZE(EmulateInstructionARM);
|
||||
LLDB_PLUGIN_INITIALIZE(EmulateInstructionARM64);
|
||||
LLDB_PLUGIN_INITIALIZE(EmulateInstructionMIPS);
|
||||
LLDB_PLUGIN_INITIALIZE(EmulateInstructionMIPS64);
|
||||
LLDB_PLUGIN_INITIALIZE(EmulateInstructionPPC64);
|
||||
|
||||
LLDB_PLUGIN_INITIALIZE(ItaniumABILanguageRuntime);
|
||||
LLDB_PLUGIN_INITIALIZE(AppleObjCRuntime);
|
||||
LLDB_PLUGIN_INITIALIZE(SystemRuntimeMacOSX);
|
||||
LLDB_PLUGIN_INITIALIZE(RenderScriptRuntime);
|
||||
|
||||
LLDB_PLUGIN_INITIALIZE(CPlusPlusLanguage);
|
||||
LLDB_PLUGIN_INITIALIZE(ObjCLanguage);
|
||||
LLDB_PLUGIN_INITIALIZE(ObjCPlusPlusLanguage);
|
||||
|
||||
#if defined(_WIN32)
|
||||
LLDB_PLUGIN_INITIALIZE(ProcessWindows);
|
||||
#endif
|
||||
#if defined(__FreeBSD__)
|
||||
LLDB_PLUGIN_INITIALIZE(ProcessFreeBSD);
|
||||
#endif
|
||||
#if defined(__APPLE__)
|
||||
LLDB_PLUGIN_INITIALIZE(SymbolVendorMacOSX);
|
||||
LLDB_PLUGIN_INITIALIZE(ProcessKDP);
|
||||
LLDB_PLUGIN_INITIALIZE(DynamicLoaderDarwinKernel);
|
||||
#endif
|
||||
|
||||
// This plugin is valid on any host that talks to a Darwin remote. It
|
||||
// shouldn't be limited to __APPLE__.
|
||||
LLDB_PLUGIN_INITIALIZE(StructuredDataDarwinLog);
|
||||
|
||||
// Platform agnostic plugins
|
||||
LLDB_PLUGIN_INITIALIZE(PlatformRemoteGDBServer);
|
||||
|
||||
LLDB_PLUGIN_INITIALIZE(ProcessGDBRemote);
|
||||
LLDB_PLUGIN_INITIALIZE(DynamicLoaderMacOSXDYLD);
|
||||
LLDB_PLUGIN_INITIALIZE(DynamicLoaderPOSIXDYLD);
|
||||
LLDB_PLUGIN_INITIALIZE(DynamicLoaderWasmDYLD); // Before DynamicLoaderStatic.
|
||||
LLDB_PLUGIN_INITIALIZE(DynamicLoaderStatic);
|
||||
LLDB_PLUGIN_INITIALIZE(DynamicLoaderWindowsDYLD);
|
||||
|
||||
// Scan for any system or user LLDB plug-ins
|
||||
// Scan for any system or user LLDB plug-ins.
|
||||
PluginManager::Initialize();
|
||||
|
||||
// The process settings need to know about installed plug-ins, so the
|
||||
// Settings must be initialized
|
||||
// AFTER PluginManager::Initialize is called.
|
||||
|
||||
// Settings must be initialized AFTER PluginManager::Initialize is called.
|
||||
Debugger::SettingsInitialize();
|
||||
|
||||
return llvm::Error::success();
|
||||
|
@ -238,94 +56,12 @@ void SystemInitializerTest::Terminate() {
|
|||
|
||||
Debugger::SettingsTerminate();
|
||||
|
||||
// Terminate and unload and loaded system or user LLDB plug-ins
|
||||
// Terminate and unload and loaded system or user LLDB plug-ins.
|
||||
PluginManager::Terminate();
|
||||
|
||||
LLDB_PLUGIN_TERMINATE(TypeSystemClang);
|
||||
|
||||
LLDB_PLUGIN_TERMINATE(ArchitectureArm);
|
||||
LLDB_PLUGIN_TERMINATE(ArchitectureMips);
|
||||
LLDB_PLUGIN_TERMINATE(ArchitecturePPC64);
|
||||
|
||||
#define LLVM_TARGET(t) LLDB_PROCESS_##t(LLDB_PLUGIN_TERMINATE)
|
||||
#include "llvm/Config/Targets.def"
|
||||
|
||||
LLDB_PLUGIN_TERMINATE(DisassemblerLLVMC);
|
||||
|
||||
LLDB_PLUGIN_TERMINATE(JITLoaderGDB);
|
||||
LLDB_PLUGIN_TERMINATE(ProcessElfCore);
|
||||
LLDB_PLUGIN_TERMINATE(ProcessMachCore);
|
||||
LLDB_PLUGIN_TERMINATE(ProcessMinidump);
|
||||
LLDB_PLUGIN_TERMINATE(MemoryHistoryASan);
|
||||
|
||||
LLDB_PLUGIN_TERMINATE(InstrumentationRuntimeASan);
|
||||
LLDB_PLUGIN_TERMINATE(InstrumentationRuntimeTSan);
|
||||
LLDB_PLUGIN_TERMINATE(InstrumentationRuntimeUBSan);
|
||||
LLDB_PLUGIN_TERMINATE(InstrumentationRuntimeMainThreadChecker);
|
||||
|
||||
LLDB_PLUGIN_TERMINATE(SymbolVendorWasm);
|
||||
LLDB_PLUGIN_TERMINATE(SymbolVendorELF);
|
||||
LLDB_PLUGIN_TERMINATE(SymbolFileBreakpad);
|
||||
LLDB_PLUGIN_TERMINATE(SymbolFileDWARF);
|
||||
LLDB_PLUGIN_TERMINATE(SymbolFilePDB);
|
||||
LLDB_PLUGIN_TERMINATE(SymbolFileSymtab);
|
||||
LLDB_PLUGIN_TERMINATE(UnwindAssembly_x86);
|
||||
LLDB_PLUGIN_TERMINATE(UnwindAssemblyInstEmulation);
|
||||
|
||||
LLDB_PLUGIN_TERMINATE(EmulateInstructionARM);
|
||||
LLDB_PLUGIN_TERMINATE(EmulateInstructionARM64);
|
||||
LLDB_PLUGIN_TERMINATE(EmulateInstructionMIPS);
|
||||
LLDB_PLUGIN_TERMINATE(EmulateInstructionMIPS64);
|
||||
LLDB_PLUGIN_TERMINATE(EmulateInstructionPPC64);
|
||||
|
||||
LLDB_PLUGIN_TERMINATE(ItaniumABILanguageRuntime);
|
||||
LLDB_PLUGIN_TERMINATE(AppleObjCRuntime);
|
||||
LLDB_PLUGIN_TERMINATE(SystemRuntimeMacOSX);
|
||||
LLDB_PLUGIN_TERMINATE(RenderScriptRuntime);
|
||||
|
||||
LLDB_PLUGIN_TERMINATE(CPlusPlusLanguage);
|
||||
LLDB_PLUGIN_TERMINATE(ObjCLanguage);
|
||||
LLDB_PLUGIN_TERMINATE(ObjCPlusPlusLanguage);
|
||||
|
||||
#if defined(__APPLE__)
|
||||
LLDB_PLUGIN_TERMINATE(DynamicLoaderDarwinKernel);
|
||||
LLDB_PLUGIN_TERMINATE(ProcessKDP);
|
||||
LLDB_PLUGIN_TERMINATE(SymbolVendorMacOSX);
|
||||
#endif
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
LLDB_PLUGIN_TERMINATE(ProcessFreeBSD);
|
||||
#endif
|
||||
Debugger::SettingsTerminate();
|
||||
|
||||
LLDB_PLUGIN_TERMINATE(PlatformRemoteGDBServer);
|
||||
LLDB_PLUGIN_TERMINATE(ProcessGDBRemote);
|
||||
LLDB_PLUGIN_TERMINATE(StructuredDataDarwinLog);
|
||||
|
||||
LLDB_PLUGIN_TERMINATE(DynamicLoaderMacOSXDYLD);
|
||||
LLDB_PLUGIN_TERMINATE(DynamicLoaderPOSIXDYLD);
|
||||
LLDB_PLUGIN_TERMINATE(DynamicLoaderWasmDYLD);
|
||||
LLDB_PLUGIN_TERMINATE(DynamicLoaderStatic);
|
||||
LLDB_PLUGIN_TERMINATE(DynamicLoaderWindowsDYLD);
|
||||
|
||||
LLDB_PLUGIN_TERMINATE(PlatformFreeBSD);
|
||||
LLDB_PLUGIN_TERMINATE(PlatformLinux);
|
||||
LLDB_PLUGIN_TERMINATE(PlatformNetBSD);
|
||||
LLDB_PLUGIN_TERMINATE(PlatformOpenBSD);
|
||||
LLDB_PLUGIN_TERMINATE(PlatformWindows);
|
||||
LLDB_PLUGIN_TERMINATE(PlatformAndroid);
|
||||
LLDB_PLUGIN_TERMINATE(PlatformMacOSX);
|
||||
|
||||
LLDB_PLUGIN_TERMINATE(ObjectFileBreakpad);
|
||||
LLDB_PLUGIN_TERMINATE(ObjectFileELF);
|
||||
LLDB_PLUGIN_TERMINATE(ObjectFileMachO);
|
||||
LLDB_PLUGIN_TERMINATE(ObjectFilePECOFF);
|
||||
LLDB_PLUGIN_TERMINATE(ObjectFileWasm);
|
||||
|
||||
LLDB_PLUGIN_TERMINATE(ObjectContainerBSDArchive);
|
||||
LLDB_PLUGIN_TERMINATE(ObjectContainerUniversalMachO);
|
||||
|
||||
LLDB_PLUGIN_TERMINATE(ScriptInterpreterNone);
|
||||
#define LLDB_SCRIPT_PLUGIN(p)
|
||||
#define LLDB_PLUGIN(p) LLDB_PLUGIN_TERMINATE(p);
|
||||
#include "Plugins/Plugins.def"
|
||||
|
||||
// Now shutdown the common parts, in reverse order.
|
||||
SystemInitializerCommon::Terminate();
|
||||
|
|
|
@ -6,7 +6,7 @@ if("ARM" IN_LIST LLVM_TARGETS_TO_BUILD)
|
|||
lldbCore
|
||||
lldbSymbol
|
||||
lldbTarget
|
||||
lldbPluginDisassemblerLLVM
|
||||
lldbPluginDisassemblerLLVMC
|
||||
lldbPluginProcessUtility
|
||||
LINK_COMPONENTS
|
||||
Support
|
||||
|
|
|
@ -5,7 +5,7 @@ add_lldb_unittest(Arm64InstEmulationTests
|
|||
lldbSymbol
|
||||
lldbTarget
|
||||
lldbPluginUnwindAssemblyInstEmulation
|
||||
lldbPluginDisassemblerLLVM
|
||||
lldbPluginDisassemblerLLVMC
|
||||
lldbPluginInstructionARM64
|
||||
lldbPluginProcessUtility
|
||||
LINK_COMPONENTS
|
||||
|
|
|
@ -5,7 +5,7 @@ add_lldb_unittest(PPC64InstEmulationTests
|
|||
lldbSymbol
|
||||
lldbTarget
|
||||
lldbPluginUnwindAssemblyInstEmulation
|
||||
lldbPluginDisassemblerLLVM
|
||||
lldbPluginDisassemblerLLVMC
|
||||
lldbPluginInstructionPPC64
|
||||
lldbPluginProcessUtility
|
||||
LINK_COMPONENTS
|
||||
|
|
Loading…
Reference in New Issue