LLDB mainline
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
lldb_private::ScriptInterpreterIORedirect Class Reference

#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
 

Detailed Description

Definition at line 107 of file ScriptInterpreter.h.

Constructor & Destructor Documentation

◆ ~ScriptInterpreterIORedirect()

ScriptInterpreterIORedirect::~ScriptInterpreterIORedirect ( )

◆ ScriptInterpreterIORedirect() [1/2]

ScriptInterpreterIORedirect::ScriptInterpreterIORedirect ( std::unique_ptr< File input,
std::unique_ptr< File output 
)
private

Definition at line 200 of file ScriptInterpreter.cpp.

◆ ScriptInterpreterIORedirect() [2/2]

ScriptInterpreterIORedirect::ScriptInterpreterIORedirect ( Debugger debugger,
CommandReturnObject result 
)
private

Member Function Documentation

◆ Create()

llvm::Expected< std::unique_ptr< ScriptInterpreterIORedirect > > ScriptInterpreterIORedirect::Create ( bool  enable_io,
Debugger debugger,
CommandReturnObject result 
)
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 180 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().

◆ Flush()

void ScriptInterpreterIORedirect::Flush ( )

Flush our output and error file handles.

Definition at line 252 of file ScriptInterpreter.cpp.

References m_error_file_sp, and m_output_file_sp.

Referenced by lldb_private::ScriptInterpreterLua::ExecuteOneLine().

◆ GetErrorFile()

lldb::FileSP lldb_private::ScriptInterpreterIORedirect::GetErrorFile ( ) const
inline

Definition at line 119 of file ScriptInterpreter.h.

References m_error_file_sp.

Referenced by lldb_private::ScriptInterpreterLua::ExecuteOneLine().

◆ GetInputFile()

lldb::FileSP lldb_private::ScriptInterpreterIORedirect::GetInputFile ( ) const
inline

Definition at line 117 of file ScriptInterpreter.h.

References m_input_file_sp.

◆ GetOutputFile()

lldb::FileSP lldb_private::ScriptInterpreterIORedirect::GetOutputFile ( ) const
inline

Definition at line 118 of file ScriptInterpreter.h.

References m_output_file_sp.

Referenced by lldb_private::ScriptInterpreterLua::ExecuteOneLine().

Member Data Documentation

◆ m_communication

ThreadedCommunication lldb_private::ScriptInterpreterIORedirect::m_communication
private

◆ m_disconnect

bool lldb_private::ScriptInterpreterIORedirect::m_disconnect
private

◆ m_error_file_sp

lldb::StreamFileSP lldb_private::ScriptInterpreterIORedirect::m_error_file_sp
private

◆ m_input_file_sp

lldb::FileSP lldb_private::ScriptInterpreterIORedirect::m_input_file_sp
private

Definition at line 129 of file ScriptInterpreter.h.

Referenced by GetInputFile(), and ScriptInterpreterIORedirect().

◆ m_output_file_sp

lldb::StreamFileSP lldb_private::ScriptInterpreterIORedirect::m_output_file_sp
private

The documentation for this class was generated from the following files: