9#ifndef LLDB_CORE_PLUGINMANAGER_H
10#define LLDB_CORE_PLUGINMANAGER_H
20#include "llvm/ADT/StringRef.h"
25#define LLDB_PLUGIN_DEFINE_ADV(ClassName, PluginName) \
26 namespace lldb_private { \
27 void lldb_initialize_##PluginName() { ClassName::Initialize(); } \
28 void lldb_terminate_##PluginName() { ClassName::Terminate(); } \
31#define LLDB_PLUGIN_DEFINE(PluginName) \
32 LLDB_PLUGIN_DEFINE_ADV(PluginName, PluginName)
35#define LLDB_PLUGIN_DECLARE(PluginName) \
36 namespace lldb_private { \
37 extern void lldb_initialize_##PluginName(); \
38 extern void lldb_terminate_##PluginName(); \
41#define LLDB_PLUGIN_INITIALIZE(PluginName) lldb_initialize_##PluginName()
42#define LLDB_PLUGIN_TERMINATE(PluginName) lldb_terminate_##PluginName()
45class CommandInterpreter;
57 static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description,
58 ABICreateInstance create_callback);
65 static void RegisterPlugin(llvm::StringRef name, llvm::StringRef description,
66 ArchitectureCreateInstance create_callback);
70 static std::unique_ptr<Architecture>
74 static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description,
75 DisassemblerCreateInstance create_callback);
79 static DisassemblerCreateInstance
82 static DisassemblerCreateInstance
88 DynamicLoaderCreateInstance create_callback,
93 static DynamicLoaderCreateInstance
96 static DynamicLoaderCreateInstance
102 JITLoaderCreateInstance create_callback,
107 static JITLoaderCreateInstance
111 static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description,
112 EmulateInstructionCreateInstance create_callback);
117 static EmulateInstructionCreateInstance
120 static EmulateInstructionCreateInstance
124 static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description,
125 OperatingSystemCreateInstance create_callback,
128 static bool UnregisterPlugin(OperatingSystemCreateInstance create_callback);
130 static OperatingSystemCreateInstance
133 static OperatingSystemCreateInstance
137 static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description,
138 LanguageCreateInstance create_callback);
146 llvm::StringRef name, llvm::StringRef description,
148 LanguageRuntimeGetCommandObject command_callback =
nullptr,
149 LanguageRuntimeGetExceptionPrecondition precondition_callback =
nullptr);
156 static LanguageRuntimeGetCommandObject
159 static LanguageRuntimeGetExceptionPrecondition
163 static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description,
164 SystemRuntimeCreateInstance create_callback);
168 static SystemRuntimeCreateInstance
175 ObjectFileCreateMemoryInstance create_memory_callback,
176 ObjectFileGetModuleSpecifications get_module_specifications,
177 ObjectFileSaveCore save_core =
nullptr,
185 static ObjectFileCreateMemoryInstance
188 static ObjectFileGetModuleSpecifications
191 static ObjectFileCreateMemoryInstance
197 llvm::StringRef plugin_name);
201 llvm::StringRef name, llvm::StringRef description,
203 ObjectFileGetModuleSpecifications get_module_specifications,
204 ObjectContainerCreateMemoryInstance create_memory_callback =
nullptr);
211 static ObjectContainerCreateMemoryInstance
214 static ObjectFileGetModuleSpecifications
220 PlatformCreateInstance create_callback,
227 static PlatformCreateInstance
239 ProcessCreateInstance create_callback,
246 static ProcessCreateInstance
257 static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description,
266 static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description,
275 static lldb::ScriptInterpreterSP
317 StructuredDataFilterLaunchInfo filter_callback =
nullptr);
325 static StructuredDataFilterLaunchInfo
327 bool &iteration_complete);
332 SymbolFileCreateInstance create_callback,
337 static SymbolFileCreateInstance
341 static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description,
342 SymbolVendorCreateInstance create_callback);
346 static SymbolVendorCreateInstance
351 llvm::StringRef name, llvm::StringRef description,
353 TraceCreateInstanceForLiveProcess create_callback_for_live_process,
354 llvm::StringRef schema,
363 static TraceCreateInstanceForLiveProcess
375 static llvm::StringRef
GetTraceSchema(llvm::StringRef plugin_name);
394 llvm::StringRef name, llvm::StringRef description,
396 ThreadTraceExportCommandCreator create_thread_trace_export_command);
407 static ThreadTraceExportCommandCreator
411 static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description,
412 UnwindAssemblyCreateInstance create_callback);
416 static UnwindAssemblyCreateInstance
420 static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description,
421 MemoryHistoryCreateInstance create_callback);
425 static MemoryHistoryCreateInstance
432 InstrumentationRuntimeGetType get_type_callback);
437 static InstrumentationRuntimeGetType
444 static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description,
459 static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description,
478 static lldb::OptionValuePropertiesSP
483 Debugger &debugger,
const lldb::OptionValuePropertiesSP &properties_sp,
484 llvm::StringRef description,
bool is_global_property);
486 static lldb::OptionValuePropertiesSP
490 Debugger &debugger,
const lldb::OptionValuePropertiesSP &properties_sp,
491 llvm::StringRef description,
bool is_global_property);
493 static lldb::OptionValuePropertiesSP
497 Debugger &debugger,
const lldb::OptionValuePropertiesSP &properties_sp,
498 llvm::StringRef description,
bool is_global_property);
501 Debugger &debugger,
const lldb::OptionValuePropertiesSP &properties_sp,
502 llvm::StringRef description,
bool is_global_property);
504 static lldb::OptionValuePropertiesSP
508 Debugger &debugger,
const lldb::OptionValuePropertiesSP &properties_sp,
509 llvm::StringRef description,
bool is_global_property);
511 static lldb::OptionValuePropertiesSP
515 Debugger &debugger,
const lldb::OptionValuePropertiesSP &properties_sp,
516 llvm::StringRef description,
bool is_global_property);
518 static lldb::OptionValuePropertiesSP
522 Debugger &debugger,
const lldb::OptionValuePropertiesSP &properties_sp,
523 llvm::StringRef description,
bool is_global_property);
525 static lldb::OptionValuePropertiesSP
530 Debugger &debugger,
const lldb::OptionValuePropertiesSP &properties_sp,
531 llvm::StringRef description,
bool is_global_property);
533 static lldb::OptionValuePropertiesSP
538 Debugger &debugger,
const lldb::OptionValuePropertiesSP &properties_sp,
539 llvm::StringRef description,
bool is_global_property);
An architecture specification class.
"lldb/Utility/ArgCompletionRequest.h"
A uniqued constant string class.
A class to manage flag bits.
static llvm::StringRef GetPlatformPluginDescriptionAtIndex(uint32_t idx)
static lldb::OptionValuePropertiesSP GetSettingForJITLoaderPlugin(Debugger &debugger, ConstString setting_name)
static llvm::StringRef GetTraceExporterPluginNameAtIndex(uint32_t index)
static bool CreateSettingForJITLoaderPlugin(Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp, llvm::StringRef description, bool is_global_property)
static lldb::OptionValuePropertiesSP GetSettingForObjectFilePlugin(Debugger &debugger, ConstString setting_name)
static ProcessCreateInstance GetProcessCreateCallbackAtIndex(uint32_t idx)
static JITLoaderCreateInstance GetJITLoaderCreateCallbackAtIndex(uint32_t idx)
static ABICreateInstance GetABICreateCallbackAtIndex(uint32_t idx)
static LanguageSet GetAllTypeSystemSupportedLanguagesForExpressions()
static bool CreateSettingForOperatingSystemPlugin(Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp, llvm::StringRef description, bool is_global_property)
static void AutoCompletePlatformName(llvm::StringRef partial_name, CompletionRequest &request)
static TraceExporterCreateInstance GetTraceExporterCreateCallback(llvm::StringRef plugin_name)
static bool CreateSettingForObjectFilePlugin(Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp, llvm::StringRef description, bool is_global_property)
static lldb::ScriptInterpreterSP GetScriptInterpreterForLanguage(lldb::ScriptLanguage script_lang, Debugger &debugger)
static void AutoCompleteProcessName(llvm::StringRef partial_name, CompletionRequest &request)
static ThreadTraceExportCommandCreator GetThreadTraceExportCommandCreatorAtIndex(uint32_t index)
Return the callback used to create the CommandObject that will be listed under "thread trace export".
static LanguageSet GetREPLAllTypeSystemSupportedLanguages()
static PlatformCreateInstance GetPlatformCreateCallbackAtIndex(uint32_t idx)
static bool CreateSettingForTracePlugin(Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp, llvm::StringRef description, bool is_global_property)
static UnwindAssemblyCreateInstance GetUnwindAssemblyCreateCallbackAtIndex(uint32_t idx)
static SymbolFileCreateInstance GetSymbolFileCreateCallbackAtIndex(uint32_t idx)
static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description, ABICreateInstance create_callback)
static TypeSystemCreateInstance GetTypeSystemCreateCallbackAtIndex(uint32_t idx)
static InstrumentationRuntimeGetType GetInstrumentationRuntimeGetTypeCallbackAtIndex(uint32_t idx)
static llvm::StringRef GetTraceSchema(llvm::StringRef plugin_name)
Get the JSON schema for a trace bundle description file corresponding to the given plugin.
static TraceCreateInstanceForLiveProcess GetTraceCreateCallbackForLiveProcess(llvm::StringRef plugin_name)
static lldb::OptionValuePropertiesSP GetSettingForProcessPlugin(Debugger &debugger, ConstString setting_name)
static LanguageRuntimeCreateInstance GetLanguageRuntimeCreateCallbackAtIndex(uint32_t idx)
static std::unique_ptr< Architecture > CreateArchitectureInstance(const ArchSpec &arch)
static SystemRuntimeCreateInstance GetSystemRuntimeCreateCallbackAtIndex(uint32_t idx)
static lldb::OptionValuePropertiesSP GetSettingForOperatingSystemPlugin(Debugger &debugger, ConstString setting_name)
static bool CreateSettingForProcessPlugin(Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp, llvm::StringRef description, bool is_global_property)
static lldb::OptionValuePropertiesSP GetSettingForPlatformPlugin(Debugger &debugger, ConstString setting_name)
static SymbolVendorCreateInstance GetSymbolVendorCreateCallbackAtIndex(uint32_t idx)
static LanguageRuntimeGetCommandObject GetLanguageRuntimeGetCommandObjectAtIndex(uint32_t idx)
static OperatingSystemCreateInstance GetOperatingSystemCreateCallbackAtIndex(uint32_t idx)
static LanguageRuntimeGetExceptionPrecondition GetLanguageRuntimeGetExceptionPreconditionAtIndex(uint32_t idx)
static REPLCreateInstance GetREPLCreateCallbackAtIndex(uint32_t idx)
static ObjectFileCreateMemoryInstance GetObjectFileCreateMemoryCallbackAtIndex(uint32_t idx)
static lldb::OptionValuePropertiesSP GetSettingForSymbolFilePlugin(Debugger &debugger, ConstString setting_name)
static DisassemblerCreateInstance GetDisassemblerCreateCallbackForPluginName(llvm::StringRef name)
static MemoryHistoryCreateInstance GetMemoryHistoryCreateCallbackAtIndex(uint32_t idx)
static bool CreateSettingForSymbolFilePlugin(Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp, llvm::StringRef description, bool is_global_property)
static bool CreateSettingForPlatformPlugin(Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp, llvm::StringRef description, bool is_global_property)
static OperatingSystemCreateInstance GetOperatingSystemCreateCallbackForPluginName(llvm::StringRef name)
static DisassemblerCreateInstance GetDisassemblerCreateCallbackAtIndex(uint32_t idx)
static ObjectContainerCreateInstance GetObjectContainerCreateCallbackAtIndex(uint32_t idx)
static ObjectFileCreateInstance GetObjectFileCreateCallbackAtIndex(uint32_t idx)
static EmulateInstructionCreateInstance GetEmulateInstructionCreateCallbackForPluginName(llvm::StringRef name)
static bool CreateSettingForStructuredDataPlugin(Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp, llvm::StringRef description, bool is_global_property)
static DynamicLoaderCreateInstance GetDynamicLoaderCreateCallbackAtIndex(uint32_t idx)
static lldb::OptionValuePropertiesSP GetSettingForDynamicLoaderPlugin(Debugger &debugger, ConstString setting_name)
static ObjectFileGetModuleSpecifications GetObjectContainerGetModuleSpecificationsCallbackAtIndex(uint32_t idx)
static DynamicLoaderCreateInstance GetDynamicLoaderCreateCallbackForPluginName(llvm::StringRef name)
static PlatformCreateInstance GetPlatformCreateCallbackForPluginName(llvm::StringRef name)
static ScriptInterpreterCreateInstance GetScriptInterpreterCreateCallbackAtIndex(uint32_t idx)
static LanguageCreateInstance GetLanguageCreateCallbackAtIndex(uint32_t idx)
static Status SaveCore(const lldb::ProcessSP &process_sp, const FileSpec &outfile, lldb::SaveCoreStyle &core_style, llvm::StringRef plugin_name)
static ProcessCreateInstance GetProcessCreateCallbackForPluginName(llvm::StringRef name)
static lldb::OptionValuePropertiesSP GetSettingForStructuredDataPlugin(Debugger &debugger, ConstString setting_name)
static llvm::StringRef GetProcessPluginDescriptionAtIndex(uint32_t idx)
static bool CreateSettingForDynamicLoaderPlugin(Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp, llvm::StringRef description, bool is_global_property)
static StructuredDataPluginCreateInstance GetStructuredDataPluginCreateCallbackAtIndex(uint32_t idx)
static ObjectFileGetModuleSpecifications GetObjectFileGetModuleSpecificationsCallbackAtIndex(uint32_t idx)
static llvm::StringRef GetPlatformPluginNameAtIndex(uint32_t idx)
static TraceCreateInstanceFromBundle GetTraceCreateCallback(llvm::StringRef plugin_name)
static void DebuggerInitialize(Debugger &debugger)
static llvm::StringRef GetProcessPluginNameAtIndex(uint32_t idx)
static LanguageSet GetAllTypeSystemSupportedLanguagesForTypes()
static bool UnregisterPlugin(ABICreateInstance create_callback)
static ObjectContainerCreateMemoryInstance GetObjectContainerCreateMemoryCallbackAtIndex(uint32_t idx)
static StructuredDataFilterLaunchInfo GetStructuredDataFilterCallbackAtIndex(uint32_t idx, bool &iteration_complete)
static InstrumentationRuntimeCreateInstance GetInstrumentationRuntimeCreateCallbackAtIndex(uint32_t idx)
static LanguageSet GetREPLSupportedLanguagesAtIndex(uint32_t idx)
static lldb::RegisterTypeBuilderSP GetRegisterTypeBuilder(Target &target)
static ObjectFileCreateMemoryInstance GetObjectFileCreateMemoryCallbackForPluginName(llvm::StringRef name)
static EmulateInstructionCreateInstance GetEmulateInstructionCreateCallbackAtIndex(uint32_t idx)
A class that represents a running process on the host machine.
ScriptLanguage
Script interpreter types.
A SmallBitVector that represents a set of source languages (lldb::LanguageType).