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) |
Definition at line 112 of file ScriptInterpreter.h.
ScriptInterpreterIORedirect::~ScriptInterpreterIORedirect | ( | ) |
Definition at line 287 of file ScriptInterpreter.cpp.
References m_communication, m_disconnect, m_error_file_sp, and m_output_file_sp.
|
private |
Definition at line 225 of file ScriptInterpreter.cpp.
References m_communication, m_disconnect, m_error_file_sp, m_input_file_sp, m_output_file_sp, and m_output_mutex.
Referenced by Create().
|
private |
Definition at line 234 of file ScriptInterpreter.cpp.
References lldb_private::Debugger::AdoptTopIOHandlerFilesIfInvalid(), lldb_private::PipePosix::CreateNew(), lldb_private::Debugger::GetErrorFileSP(), lldb_private::Debugger::GetInputFileSP(), lldb_private::Debugger::GetOutputFileSP(), lldb_private::CommandReturnObject::GetOutputStream(), m_communication, m_disconnect, m_error_file_sp, m_input_file_sp, m_output_file_sp, m_output_mutex, lldb_private::NativeFile::Owned, ReadThreadBytesReceived(), lldb_private::PipePosix::ReleaseReadFileDescriptor(), lldb_private::PipePosix::ReleaseWriteFileDescriptor(), lldb_private::CommandReturnObject::SetImmediateErrorFile(), and lldb_private::CommandReturnObject::SetImmediateOutputFile().
|
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 205 of file ScriptInterpreter.cpp.
References lldb_private::FileSystem::DEV_NULL, lldb_private::File::eOpenOptionReadOnly, lldb_private::File::eOpenOptionWriteOnly, lldb_private::FileSystem::Instance(), lldb_private::FileSystem::Open(), and ScriptInterpreterIORedirect().
Referenced by lldb_private::ScriptInterpreterLua::ExecuteOneLine().
void ScriptInterpreterIORedirect::Flush | ( | ) |
Flush our output and error file handles.
Definition at line 280 of file ScriptInterpreter.cpp.
References m_error_file_sp, and m_output_file_sp.
Referenced by lldb_private::ScriptInterpreterLua::ExecuteOneLine().
|
inline |
Definition at line 126 of file ScriptInterpreter.h.
References m_error_file_sp.
Referenced by lldb_private::ScriptInterpreterLua::ExecuteOneLine().
|
inline |
Definition at line 122 of file ScriptInterpreter.h.
References m_input_file_sp.
|
inline |
Definition at line 123 of file ScriptInterpreter.h.
References m_output_file_sp.
Referenced by lldb_private::ScriptInterpreterLua::ExecuteOneLine().
|
private |
Definition at line 142 of file ScriptInterpreter.h.
Referenced by ScriptInterpreterIORedirect(), ScriptInterpreterIORedirect(), and ~ScriptInterpreterIORedirect().
|
private |
Definition at line 143 of file ScriptInterpreter.h.
Referenced by ScriptInterpreterIORedirect(), ScriptInterpreterIORedirect(), and ~ScriptInterpreterIORedirect().
|
private |
Definition at line 140 of file ScriptInterpreter.h.
Referenced by Flush(), GetErrorFile(), ScriptInterpreterIORedirect(), ScriptInterpreterIORedirect(), and ~ScriptInterpreterIORedirect().
|
private |
Definition at line 138 of file ScriptInterpreter.h.
Referenced by GetInputFile(), ScriptInterpreterIORedirect(), and ScriptInterpreterIORedirect().
|
private |
Definition at line 139 of file ScriptInterpreter.h.
Referenced by Flush(), GetOutputFile(), ScriptInterpreterIORedirect(), ScriptInterpreterIORedirect(), and ~ScriptInterpreterIORedirect().
|
private |
Definition at line 141 of file ScriptInterpreter.h.
Referenced by ScriptInterpreterIORedirect(), and ScriptInterpreterIORedirect().