[Lldb-commits] [lldb] [lldb] Real-time console pane for output in lldb tui (PR #177160)

Nagesh Nazare via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 7 08:54:34 PDT 2026


================
@@ -6309,6 +6309,236 @@ HandleCharResult HelpDialogDelegate::WindowDelegateHandleChar(Window &window,
   return eKeyHandled;
 }
 
+class ConsoleOutputWindowDelegate : public WindowDelegate {
+private:
+  void PollProcessOutput() {
+    ExecutionContext exe_ctx =
+        m_debugger.GetCommandInterpreter().GetExecutionContext();
+    Process *process = exe_ctx.GetProcessPtr();
+
+    if (!process || !process->IsAlive())
+      return;
+
+    // Buffer for reading output.
+    char buffer[1024];
+    Status error;
+
+    // Read process's stdout.
+    size_t stdout_bytes = process->GetSTDOUT(buffer, sizeof(buffer) - 1, error);
+    if (stdout_bytes > 0) {
+      buffer[stdout_bytes] = '\0';
+      AppendOutput(buffer, false);
----------------
nageshnnazare wrote:

Fixed it in latest version

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


More information about the lldb-commits mailing list