Skip to content

Commit c677a11

Browse files
authored
[lldb] Add support to list/enable/disable remaining plugin types. (#143970)
In #134418 we added support to list/enable/disable `SystemRuntime` and `InstrumentationRuntime` plugins. We limited it to those two plugin types to flesh out the idea with a smaller change. This PR adds support for the remaining plugin types. We now support all the plugins that can be registered directly with the plugin manager. Plugins that are added by loading shared objects are still not supported.
1 parent 9ae4d2e commit c677a11

File tree

4 files changed

+566
-53
lines changed

4 files changed

+566
-53
lines changed

lldb/include/lldb/Core/PluginManager.h

Lines changed: 96 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -236,12 +236,6 @@ class PluginManager {
236236
static SystemRuntimeCreateInstance
237237
GetSystemRuntimeCreateCallbackAtIndex(uint32_t idx);
238238

239-
static std::vector<RegisteredPluginInfo> GetSystemRuntimePluginInfo();
240-
241-
// Modify the enabled state of a SystemRuntime plugin.
242-
// Returns false if the plugin name is not found.
243-
static bool SetSystemRuntimePluginEnabled(llvm::StringRef name, bool enabled);
244-
245239
// ObjectFile
246240
static bool
247241
RegisterPlugin(llvm::StringRef name, llvm::StringRef description,
@@ -549,12 +543,6 @@ class PluginManager {
549543
static InstrumentationRuntimeCreateInstance
550544
GetInstrumentationRuntimeCreateCallbackAtIndex(uint32_t idx);
551545

552-
static std::vector<RegisteredPluginInfo>
553-
GetInstrumentationRuntimePluginInfo();
554-
555-
static bool SetInstrumentationRuntimePluginEnabled(llvm::StringRef name,
556-
bool enabled);
557-
558546
// TypeSystem
559547
static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description,
560548
TypeSystemCreateInstance create_callback,
@@ -690,6 +678,102 @@ class PluginManager {
690678
static bool CreateSettingForCPlusPlusLanguagePlugin(
691679
Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
692680
llvm::StringRef description, bool is_global_property);
681+
682+
//
683+
// Plugin Info+Enable Declarations
684+
//
685+
static std::vector<RegisteredPluginInfo> GetABIPluginInfo();
686+
static bool SetABIPluginEnabled(llvm::StringRef name, bool enable);
687+
688+
static std::vector<RegisteredPluginInfo> GetArchitecturePluginInfo();
689+
static bool SetArchitecturePluginEnabled(llvm::StringRef name, bool enable);
690+
691+
static std::vector<RegisteredPluginInfo> GetDisassemblerPluginInfo();
692+
static bool SetDisassemblerPluginEnabled(llvm::StringRef name, bool enable);
693+
694+
static std::vector<RegisteredPluginInfo> GetDynamicLoaderPluginInfo();
695+
static bool SetDynamicLoaderPluginEnabled(llvm::StringRef name, bool enable);
696+
697+
static std::vector<RegisteredPluginInfo> GetEmulateInstructionPluginInfo();
698+
static bool SetEmulateInstructionPluginEnabled(llvm::StringRef name,
699+
bool enable);
700+
701+
static std::vector<RegisteredPluginInfo>
702+
GetInstrumentationRuntimePluginInfo();
703+
static bool SetInstrumentationRuntimePluginEnabled(llvm::StringRef name,
704+
bool enable);
705+
706+
static std::vector<RegisteredPluginInfo> GetJITLoaderPluginInfo();
707+
static bool SetJITLoaderPluginEnabled(llvm::StringRef name, bool enable);
708+
709+
static std::vector<RegisteredPluginInfo> GetLanguagePluginInfo();
710+
static bool SetLanguagePluginEnabled(llvm::StringRef name, bool enable);
711+
712+
static std::vector<RegisteredPluginInfo> GetLanguageRuntimePluginInfo();
713+
static bool SetLanguageRuntimePluginEnabled(llvm::StringRef name,
714+
bool enable);
715+
716+
static std::vector<RegisteredPluginInfo> GetMemoryHistoryPluginInfo();
717+
static bool SetMemoryHistoryPluginEnabled(llvm::StringRef name, bool enable);
718+
719+
static std::vector<RegisteredPluginInfo> GetObjectContainerPluginInfo();
720+
static bool SetObjectContainerPluginEnabled(llvm::StringRef name,
721+
bool enable);
722+
723+
static std::vector<RegisteredPluginInfo> GetObjectFilePluginInfo();
724+
static bool SetObjectFilePluginEnabled(llvm::StringRef name, bool enable);
725+
726+
static std::vector<RegisteredPluginInfo> GetOperatingSystemPluginInfo();
727+
static bool SetOperatingSystemPluginEnabled(llvm::StringRef name,
728+
bool enable);
729+
730+
static std::vector<RegisteredPluginInfo> GetPlatformPluginInfo();
731+
static bool SetPlatformPluginEnabled(llvm::StringRef name, bool enable);
732+
733+
static std::vector<RegisteredPluginInfo> GetProcessPluginInfo();
734+
static bool SetProcessPluginEnabled(llvm::StringRef name, bool enable);
735+
736+
static std::vector<RegisteredPluginInfo> GetREPLPluginInfo();
737+
static bool SetREPLPluginEnabled(llvm::StringRef name, bool enable);
738+
739+
static std::vector<RegisteredPluginInfo> GetRegisterTypeBuilderPluginInfo();
740+
static bool SetRegisterTypeBuilderPluginEnabled(llvm::StringRef name,
741+
bool enable);
742+
743+
static std::vector<RegisteredPluginInfo> GetScriptInterpreterPluginInfo();
744+
static bool SetScriptInterpreterPluginEnabled(llvm::StringRef name,
745+
bool enable);
746+
747+
static std::vector<RegisteredPluginInfo> GetScriptedInterfacePluginInfo();
748+
static bool SetScriptedInterfacePluginEnabled(llvm::StringRef name,
749+
bool enable);
750+
751+
static std::vector<RegisteredPluginInfo> GetStructuredDataPluginInfo();
752+
static bool SetStructuredDataPluginEnabled(llvm::StringRef name, bool enable);
753+
754+
static std::vector<RegisteredPluginInfo> GetSymbolFilePluginInfo();
755+
static bool SetSymbolFilePluginEnabled(llvm::StringRef name, bool enable);
756+
757+
static std::vector<RegisteredPluginInfo> GetSymbolLocatorPluginInfo();
758+
static bool SetSymbolLocatorPluginEnabled(llvm::StringRef name, bool enable);
759+
760+
static std::vector<RegisteredPluginInfo> GetSymbolVendorPluginInfo();
761+
static bool SetSymbolVendorPluginEnabled(llvm::StringRef name, bool enable);
762+
763+
static std::vector<RegisteredPluginInfo> GetSystemRuntimePluginInfo();
764+
static bool SetSystemRuntimePluginEnabled(llvm::StringRef name, bool enable);
765+
766+
static std::vector<RegisteredPluginInfo> GetTracePluginInfo();
767+
static bool SetTracePluginEnabled(llvm::StringRef name, bool enable);
768+
769+
static std::vector<RegisteredPluginInfo> GetTraceExporterPluginInfo();
770+
static bool SetTraceExporterPluginEnabled(llvm::StringRef name, bool enable);
771+
772+
static std::vector<RegisteredPluginInfo> GetTypeSystemPluginInfo();
773+
static bool SetTypeSystemPluginEnabled(llvm::StringRef name, bool enable);
774+
775+
static std::vector<RegisteredPluginInfo> GetUnwindAssemblyPluginInfo();
776+
static bool SetUnwindAssemblyPluginEnabled(llvm::StringRef name, bool enable);
693777
};
694778

695779
} // namespace lldb_private

0 commit comments

Comments
 (0)