[Lldb-commits] [lldb] Add commands to list/enable/disable plugins (PR #134418)
David Peixotto via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 2 10:45:14 PDT 2025
================
@@ -464,6 +466,24 @@ llvm::json::Value DebuggerStats::ReportStatistics(
}
}
+ if (include_plugins) {
+ json::Object plugin_stats;
+ for (const PluginNamespace &plugin_ns :
+ PluginManager::GetPluginNamespaces()) {
+ json::Array namespace_stats;
+
+ for (const RegisteredPluginInfo &plugin : plugin_ns.get_info()) {
+ json::Object plugin_json;
+ plugin_json.try_emplace("name", plugin.name);
+ plugin_json.try_emplace("enabled", plugin.enabled);
+
+ namespace_stats.emplace_back(std::move(plugin_json));
+ }
+ plugin_stats.try_emplace(plugin_ns.name, std::move(namespace_stats));
+ }
+ global_stats.try_emplace("plugins", std::move(plugin_stats));
+ }
+
----------------
dmpots wrote:
Moved the code to the PluginManager and added support for `plugin list --json` on the command line.
https://github.com/llvm/llvm-project/pull/134418
More information about the lldb-commits
mailing list