[Lldb-commits] [lldb] 9999c31 - [NFC][lldb] document Process::SetSTDIOFileDescriptor (#169849)
via lldb-commits
lldb-commits at lists.llvm.org
Fri Nov 28 06:27:57 PST 2025
Author: Charles Zablit
Date: 2025-11-28T14:27:52Z
New Revision: 9999c316968ffdb77a69f883f8ddbdfe0b57a44b
URL: https://github.com/llvm/llvm-project/commit/9999c316968ffdb77a69f883f8ddbdfe0b57a44b
DIFF: https://github.com/llvm/llvm-project/commit/9999c316968ffdb77a69f883f8ddbdfe0b57a44b.diff
LOG: [NFC][lldb] document Process::SetSTDIOFileDescriptor (#169849)
Added:
Modified:
lldb/include/lldb/Target/Process.h
Removed:
################################################################################
diff --git a/lldb/include/lldb/Target/Process.h b/lldb/include/lldb/Target/Process.h
index c1f9785e76f90..8e6c16cbfe0fc 100644
--- a/lldb/include/lldb/Target/Process.h
+++ b/lldb/include/lldb/Target/Process.h
@@ -2534,6 +2534,28 @@ 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.
+ ///
+ /// When data is successfully read from the file descriptor, it is stored in
+ /// m_stdout_data. There is no
diff erentiation 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
+ /// 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.
More information about the lldb-commits
mailing list