LLDB mainline
|
#include <ScriptInterpreter.h>
Public Member Functions | |
~ScriptInterpreterIORedirect () | |
lldb::FileSP | GetInputFile () const |
lldb::FileSP | GetOutputFile () const |
lldb::FileSP | GetErrorFile () const |
void | Flush () |
Flush our output and error file handles. | |
Static Public Member Functions | |
static llvm::Expected< std::unique_ptr< ScriptInterpreterIORedirect > > | Create (bool enable_io, Debugger &debugger, CommandReturnObject *result) |
Create an IO redirect. | |
Private Member Functions | |
ScriptInterpreterIORedirect (std::unique_ptr< File > input, std::unique_ptr< File > output) | |
ScriptInterpreterIORedirect (Debugger &debugger, CommandReturnObject *result) | |
Private Attributes | |
lldb::FileSP | m_input_file_sp |
lldb::StreamFileSP | m_output_file_sp |
lldb::StreamFileSP | m_error_file_sp |
ThreadedCommunication | m_communication |
bool | m_disconnect |
Definition at line 102 of file ScriptInterpreter.h.
ScriptInterpreterIORedirect::~ScriptInterpreterIORedirect | ( | ) |
Definition at line 246 of file ScriptInterpreter.cpp.
References lldb_private::ThreadedCommunication::Disconnect(), lldb_private::ThreadedCommunication::JoinReadThread(), m_communication, m_disconnect, m_error_file_sp, and m_output_file_sp.
|
private |
Definition at line 187 of file ScriptInterpreter.cpp.
|
private |
Definition at line 195 of file ScriptInterpreter.cpp.
References lldb_private::Debugger::AdoptTopIOHandlerFilesIfInvalid(), lldb_private::Debugger::GetErrorStream(), lldb_private::StreamFile::GetFileSP(), lldb_private::Debugger::GetInputFileSP(), lldb_private::Debugger::GetOutputStream(), lldb_private::CommandReturnObject::GetOutputStream(), m_communication, m_disconnect, m_error_file_sp, m_input_file_sp, m_output_file_sp, ReadThreadBytesReceived(), lldb_private::ThreadedCommunication::SetConnection(), lldb_private::CommandReturnObject::SetImmediateErrorFile(), lldb_private::CommandReturnObject::SetImmediateOutputFile(), lldb_private::ThreadedCommunication::SetReadThreadBytesReceivedCallback(), and lldb_private::ThreadedCommunication::StartReadThread().
|
static |
Create an IO redirect.
If IO is enabled, this will redirects the output to the command return object if set or to the debugger otherwise. If IO is disabled, it will redirect all IO to /dev/null.
Definition at line 167 of file ScriptInterpreter.cpp.
References lldb_private::FileSystem::DEV_NULL, lldb_private::File::eOpenOptionReadOnly, lldb_private::File::eOpenOptionWriteOnly, lldb_private::FileSystem::Instance(), and lldb_private::FileSystem::Open().
Referenced by lldb_private::ScriptInterpreterLua::ExecuteOneLine().
void ScriptInterpreterIORedirect::Flush | ( | ) |
Flush our output and error file handles.
Definition at line 239 of file ScriptInterpreter.cpp.
References m_error_file_sp, and m_output_file_sp.
Referenced by lldb_private::ScriptInterpreterLua::ExecuteOneLine().
|
inline |
Definition at line 114 of file ScriptInterpreter.h.
References m_error_file_sp.
Referenced by lldb_private::ScriptInterpreterLua::ExecuteOneLine().
|
inline |
Definition at line 112 of file ScriptInterpreter.h.
References m_input_file_sp.
|
inline |
Definition at line 113 of file ScriptInterpreter.h.
References m_output_file_sp.
Referenced by lldb_private::ScriptInterpreterLua::ExecuteOneLine().
|
private |
Definition at line 127 of file ScriptInterpreter.h.
Referenced by ScriptInterpreterIORedirect(), and ~ScriptInterpreterIORedirect().
|
private |
Definition at line 128 of file ScriptInterpreter.h.
Referenced by ScriptInterpreterIORedirect(), and ~ScriptInterpreterIORedirect().
|
private |
Definition at line 126 of file ScriptInterpreter.h.
Referenced by Flush(), GetErrorFile(), ScriptInterpreterIORedirect(), and ~ScriptInterpreterIORedirect().
|
private |
Definition at line 124 of file ScriptInterpreter.h.
Referenced by GetInputFile(), and ScriptInterpreterIORedirect().
|
private |
Definition at line 125 of file ScriptInterpreter.h.
Referenced by Flush(), GetOutputFile(), ScriptInterpreterIORedirect(), and ~ScriptInterpreterIORedirect().