https://github.com/charles-zablit updated 
https://github.com/llvm/llvm-project/pull/169849

>From 16254da649fe8eee3b1124179d9c06dfca265eb7 Mon Sep 17 00:00:00 2001
From: Charles Zablit <[email protected]>
Date: Thu, 27 Nov 2025 18:28:13 +0000
Subject: [PATCH 1/2] [NFC][lldb] document Process::SetSTDIOFileDescriptor

---
 lldb/include/lldb/Target/Process.h | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/lldb/include/lldb/Target/Process.h 
b/lldb/include/lldb/Target/Process.h
index c1f9785e76f90..d6a8225d079b9 100644
--- a/lldb/include/lldb/Target/Process.h
+++ b/lldb/include/lldb/Target/Process.h
@@ -2534,6 +2534,25 @@ void PruneThreadPlans();
 
   void CalculateExecutionContext(ExecutionContext &exe_ctx) override;
 
+  /// Associates a file descriptor with the process' STDIO handling
+  /// and configures an asynchronous reading of that descriptor.
+  ///
+  /// This method installs a ConnectionFileDescriptor for the passed file
+  /// descriptor and starts a dedicated read thread. If the read thread starts
+  /// successfully, the method also ensures that an IOHandlerProcessSTDIO is
+  /// created to manage user input to the process.
+  ///
+  /// The descriptor's ownership is transferred to the underlying
+  /// ConnectionFileDescriptor.
+  ///
+  /// \param[in] fd
+  ///     The file descriptor to use for process STDIO communication. It's
+  ///     assumed to be valid and will be managed by the newly created
+  ///     connection.
+  ///
+  /// \see lldb_private::Process::STDIOReadThreadBytesReceived()
+  /// \see lldb_private::IOHandlerProcessSTDIO
+  /// \see lldb_private::ConnectionFileDescriptor
   void SetSTDIOFileDescriptor(int file_descriptor);
 
   // Add a permanent region of memory that should never be read or written to.

>From 089ad6f6ef7dd628ee1ae347f11eb64b8364c777 Mon Sep 17 00:00:00 2001
From: Charles Zablit <[email protected]>
Date: Fri, 28 Nov 2025 13:07:39 +0000
Subject: [PATCH 2/2] fixup! [NFC][lldb] document
 Process::SetSTDIOFileDescriptor

---
 lldb/include/lldb/Target/Process.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lldb/include/lldb/Target/Process.h 
b/lldb/include/lldb/Target/Process.h
index d6a8225d079b9..8e6c16cbfe0fc 100644
--- a/lldb/include/lldb/Target/Process.h
+++ b/lldb/include/lldb/Target/Process.h
@@ -2545,6 +2545,9 @@ void PruneThreadPlans();
   /// The descriptor's ownership is transferred to the underlying
   /// ConnectionFileDescriptor.
   ///
+  /// When data is successfully read from the file descriptor, it is stored in
+  /// m_stdout_data. There is no differentiation between stdout and stderr.
+  ///
   /// \param[in] fd
   ///     The file descriptor to use for process STDIO communication. It's
   ///     assumed to be valid and will be managed by the newly created

_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to