[Lldb-commits] [lldb] [lldb] Add a BugReporter plugin type and "diagnostics report" (PR #206578)

Med Ismail Bennani via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 29 13:53:27 PDT 2026


================
@@ -107,13 +112,119 @@ class CommandObjectDiagnosticsDump : public CommandObjectParsed {
   CommandOptions m_options;
 };
 
+class CommandObjectDiagnosticsReport : public CommandObjectParsed {
+public:
+  CommandObjectDiagnosticsReport(CommandInterpreter &interpreter)
+      : CommandObjectParsed(
+            interpreter, "diagnostics report",
+            "Assemble a diagnostics bundle and file it as a bug report.",
+            nullptr) {}
+
+  ~CommandObjectDiagnosticsReport() override = default;
+
+  class CommandOptions : public Options {
+  public:
+    CommandOptions() = default;
+
+    ~CommandOptions() override = default;
+
+    Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
+                          ExecutionContext *execution_context) override {
+      Status error;
+      const int short_option = m_getopt_table[option_idx].val;
+
+      switch (short_option) {
+      case 'd':
+        directory.SetDirectory(option_arg);
+        break;
+      case 'n':
+        no_open = true;
+        break;
+      default:
+        llvm_unreachable("Unimplemented option");
+      }
----------------
medismailben wrote:

As we add more bug report plugins (specifically for downstream forks), we should have a way to pass a bug report plugin name like we do for process plugins.

https://github.com/llvm/llvm-project/pull/206578


More information about the lldb-commits mailing list