|
LLDB mainline
|
A Python sys.stdout/stderr file backed by a pipe whose read end is drained by a reader thread that writes to the debugger's terminal under the output lock (Debugger::PrintAsync). More...
Public Member Functions | |
| ~SessionIORedirect () | |
| int | GetWriteDescriptor () const |
Static Public Member Functions | |
| static std::unique_ptr< SessionIORedirect > | Create (lldb::user_id_t debugger_id, bool is_stdout) |
Private Member Functions | |
| SessionIORedirect (lldb::user_id_t debugger_id, bool is_stdout) | |
Static Private Member Functions | |
| static void | ReadThreadBytesReceived (void *baton, const void *src, size_t src_len) |
Private Attributes | |
| lldb::user_id_t | m_debugger_id |
| bool | m_is_stdout |
| lldb::FileSP | m_write_file_sp |
| ThreadedCommunication | m_communication |
| bool | m_connected = false |
A Python sys.stdout/stderr file backed by a pipe whose read end is drained by a reader thread that writes to the debugger's terminal under the output lock (Debugger::PrintAsync).
Handing Python the raw terminal descriptor instead lets a script's print() race the statusline, which redraws on the event thread under that lock. Its cursor save/restore then rewinds over and eats the script's output.
Definition at line 817 of file ScriptInterpreterPython.cpp.
|
inline |
Definition at line 855 of file ScriptInterpreterPython.cpp.
References m_communication, m_connected, and m_write_file_sp.
|
inlineprivate |
Definition at line 871 of file ScriptInterpreterPython.cpp.
References m_communication, m_debugger_id, and m_is_stdout.
Referenced by Create(), and ReadThreadBytesReceived().
|
inlinestatic |
Definition at line 819 of file ScriptInterpreterPython.cpp.
References lldb_private::PipePosix::CreateNew(), lldb_private::File::eOpenOptionWriteOnly, lldb_private::Status::Fail(), lldb_private::NativeFileBase::Owned, ReadThreadBytesReceived(), lldb_private::PipePosix::ReleaseReadFileDescriptor(), lldb_private::PipePosix::ReleaseWriteFileDescriptor(), and SessionIORedirect().
|
inline |
Definition at line 865 of file ScriptInterpreterPython.cpp.
References lldb_private::File::kInvalidDescriptor, and m_write_file_sp.
|
inlinestaticprivate |
Definition at line 875 of file ScriptInterpreterPython.cpp.
References lldb_private::Debugger::FindDebuggerWithID(), and SessionIORedirect().
Referenced by Create().
|
private |
Definition at line 889 of file ScriptInterpreterPython.cpp.
Referenced by SessionIORedirect(), and ~SessionIORedirect().
|
private |
Definition at line 890 of file ScriptInterpreterPython.cpp.
Referenced by ~SessionIORedirect().
|
private |
Definition at line 886 of file ScriptInterpreterPython.cpp.
Referenced by SessionIORedirect().
|
private |
Definition at line 887 of file ScriptInterpreterPython.cpp.
Referenced by SessionIORedirect().
|
private |
Definition at line 888 of file ScriptInterpreterPython.cpp.
Referenced by GetWriteDescriptor(), and ~SessionIORedirect().