LLDB mainline
|
#include <PipeWindows.h>
Public Member Functions | |
PipeWindows () | |
PipeWindows (lldb::pipe_t read, lldb::pipe_t write) | |
~PipeWindows () override | |
Status | CreateNew (bool child_process_inherit) override |
Status | CreateNew (llvm::StringRef name, bool child_process_inherit) override |
Status | CreateWithUniqueName (llvm::StringRef prefix, bool child_process_inherit, llvm::SmallVectorImpl< char > &name) override |
Status | OpenAsReader (llvm::StringRef name, bool child_process_inherit) override |
Status | OpenAsWriterWithTimeout (llvm::StringRef name, bool child_process_inherit, const std::chrono::microseconds &timeout) override |
bool | CanRead () const override |
bool | CanWrite () const override |
lldb::pipe_t | GetReadPipe () const override |
lldb::pipe_t | GetWritePipe () const override |
int | GetReadFileDescriptor () const override |
int | GetWriteFileDescriptor () const override |
int | ReleaseReadFileDescriptor () override |
int | ReleaseWriteFileDescriptor () override |
void | CloseReadFileDescriptor () override |
void | CloseWriteFileDescriptor () override |
void | Close () override |
Status | Delete (llvm::StringRef name) override |
Status | WriteWithTimeout (const void *buf, size_t size, const std::chrono::microseconds &timeout, size_t &bytes_written) override |
Status | ReadWithTimeout (void *buf, size_t size, const std::chrono::microseconds &timeout, size_t &bytes_read) override |
HANDLE | GetReadNativeHandle () |
HANDLE | GetWriteNativeHandle () |
Public Member Functions inherited from lldb_private::PipeBase | |
virtual | ~PipeBase () |
virtual Status | CreateNew (bool child_process_inherit)=0 |
virtual Status | CreateNew (llvm::StringRef name, bool child_process_inherit)=0 |
virtual Status | CreateWithUniqueName (llvm::StringRef prefix, bool child_process_inherit, llvm::SmallVectorImpl< char > &name)=0 |
virtual Status | OpenAsReader (llvm::StringRef name, bool child_process_inherit)=0 |
Status | OpenAsWriter (llvm::StringRef name, bool child_process_inherit) |
virtual Status | OpenAsWriterWithTimeout (llvm::StringRef name, bool child_process_inherit, const std::chrono::microseconds &timeout)=0 |
virtual bool | CanRead () const =0 |
virtual bool | CanWrite () const =0 |
virtual lldb::pipe_t | GetReadPipe () const =0 |
virtual lldb::pipe_t | GetWritePipe () const =0 |
virtual int | GetReadFileDescriptor () const =0 |
virtual int | GetWriteFileDescriptor () const =0 |
virtual int | ReleaseReadFileDescriptor ()=0 |
virtual int | ReleaseWriteFileDescriptor ()=0 |
virtual void | CloseReadFileDescriptor ()=0 |
virtual void | CloseWriteFileDescriptor ()=0 |
virtual void | Close ()=0 |
virtual Status | Delete (llvm::StringRef name)=0 |
virtual Status | WriteWithTimeout (const void *buf, size_t size, const std::chrono::microseconds &timeout, size_t &bytes_written)=0 |
Status | Write (const void *buf, size_t size, size_t &bytes_written) |
virtual Status | ReadWithTimeout (void *buf, size_t size, const std::chrono::microseconds &timeout, size_t &bytes_read)=0 |
Status | Read (void *buf, size_t size, size_t &bytes_read) |
Static Public Attributes | |
static const int | kInvalidDescriptor = -1 |
Private Member Functions | |
Status | OpenNamedPipe (llvm::StringRef name, bool child_process_inherit, bool is_read) |
Private Attributes | |
HANDLE | m_read |
HANDLE | m_write |
int | m_read_fd |
int | m_write_fd |
OVERLAPPED | m_read_overlapped |
OVERLAPPED | m_write_overlapped |
Definition at line 22 of file PipeWindows.h.
PipeWindows::PipeWindows | ( | ) |
Definition at line 28 of file PipeWindows.cpp.
References m_read_overlapped, and m_write_overlapped.
PipeWindows::PipeWindows | ( | lldb::pipe_t | read, |
lldb::pipe_t | write | ||
) |
Definition at line 36 of file PipeWindows.cpp.
References LLDB_INVALID_PIPE, m_read, m_read_fd, m_read_overlapped, m_write, m_write_fd, and m_write_overlapped.
|
override |
Definition at line 67 of file PipeWindows.cpp.
References Close().
|
overridevirtual |
Implements lldb_private::PipeBase.
Definition at line 263 of file PipeWindows.cpp.
References m_read.
Referenced by CloseReadFileDescriptor(), CreateNew(), OpenAsReader(), OpenNamedPipe(), ReadWithTimeout(), and ReleaseReadFileDescriptor().
|
overridevirtual |
Implements lldb_private::PipeBase.
Definition at line 265 of file PipeWindows.cpp.
References m_write.
Referenced by CloseWriteFileDescriptor(), CreateNew(), OpenAsWriterWithTimeout(), OpenNamedPipe(), ReleaseWriteFileDescriptor(), and WriteWithTimeout().
|
overridevirtual |
Implements lldb_private::PipeBase.
Definition at line 256 of file PipeWindows.cpp.
References CloseReadFileDescriptor(), and CloseWriteFileDescriptor().
Referenced by ~PipeWindows().
|
overridevirtual |
Implements lldb_private::PipeBase.
Definition at line 230 of file PipeWindows.cpp.
References CanRead(), kInvalidDescriptor, m_read, m_read_fd, and m_read_overlapped.
Referenced by Close(), and CreateNew().
|
overridevirtual |
Implements lldb_private::PipeBase.
Definition at line 243 of file PipeWindows.cpp.
References CanWrite(), kInvalidDescriptor, m_write, m_write_fd, and m_write_overlapped.
Referenced by Close().
|
overridevirtual |
Implements lldb_private::PipeBase.
Definition at line 69 of file PipeWindows.cpp.
References CreateNew(), and g_pipe_serial().
Referenced by CreateNew(), and CreateWithUniqueName().
|
overridevirtual |
Implements lldb_private::PipeBase.
Definition at line 82 of file PipeWindows.cpp.
References CanRead(), CanWrite(), CloseReadFileDescriptor(), lldb::eErrorTypeWin32, g_pipe_name_prefix, m_read, m_read_fd, m_read_overlapped, OpenNamedPipe(), and lldb_private::Status::Success().
|
overridevirtual |
Implements lldb_private::PipeBase.
Definition at line 122 of file PipeWindows.cpp.
References CreateNew(), lldb::eErrorTypeWin32, and error().
|
overridevirtual |
Implements lldb_private::PipeBase.
Definition at line 261 of file PipeWindows.cpp.
|
overridevirtual |
Implements lldb_private::PipeBase.
Definition at line 202 of file PipeWindows.cpp.
References m_read_fd.
HANDLE PipeWindows::GetReadNativeHandle | ( | ) |
Definition at line 268 of file PipeWindows.cpp.
References m_read.
|
inlineoverridevirtual |
|
overridevirtual |
Implements lldb_private::PipeBase.
Definition at line 204 of file PipeWindows.cpp.
References m_write_fd.
HANDLE PipeWindows::GetWriteNativeHandle | ( | ) |
Definition at line 271 of file PipeWindows.cpp.
References m_write.
|
inlineoverridevirtual |
|
overridevirtual |
Implements lldb_private::PipeBase.
Definition at line 146 of file PipeWindows.cpp.
References CanRead(), and OpenNamedPipe().
|
overridevirtual |
Implements lldb_private::PipeBase.
Definition at line 155 of file PipeWindows.cpp.
References CanWrite(), and OpenNamedPipe().
|
private |
Definition at line 164 of file PipeWindows.cpp.
References CanRead(), CanWrite(), lldb::eErrorTypeWin32, g_pipe_name_prefix, m_read, m_read_fd, m_read_overlapped, m_write, m_write_fd, and m_write_overlapped.
Referenced by CreateNew(), OpenAsReader(), and OpenAsWriterWithTimeout().
|
overridevirtual |
Implements lldb_private::PipeBase.
Definition at line 273 of file PipeWindows.cpp.
References CanRead(), lldb::eErrorTypeWin32, m_read, and m_read_overlapped.
|
overridevirtual |
Implements lldb_private::PipeBase.
Definition at line 206 of file PipeWindows.cpp.
References CanRead(), kInvalidDescriptor, m_read, m_read_fd, and m_read_overlapped.
|
overridevirtual |
Implements lldb_private::PipeBase.
Definition at line 218 of file PipeWindows.cpp.
References CanWrite(), kInvalidDescriptor, m_write, m_write_fd, and m_write_overlapped.
|
overridevirtual |
Implements lldb_private::PipeBase.
Definition at line 324 of file PipeWindows.cpp.
References CanWrite(), lldb::eErrorTypeWin32, m_write, and m_write_overlapped.
|
static |
Definition at line 24 of file PipeWindows.h.
Referenced by CloseReadFileDescriptor(), CloseWriteFileDescriptor(), ReleaseReadFileDescriptor(), and ReleaseWriteFileDescriptor().
|
private |
Definition at line 78 of file PipeWindows.h.
Referenced by CanRead(), CloseReadFileDescriptor(), CreateNew(), GetReadNativeHandle(), GetReadPipe(), OpenNamedPipe(), PipeWindows(), ReadWithTimeout(), and ReleaseReadFileDescriptor().
|
private |
Definition at line 81 of file PipeWindows.h.
Referenced by CloseReadFileDescriptor(), CreateNew(), GetReadFileDescriptor(), OpenNamedPipe(), PipeWindows(), and ReleaseReadFileDescriptor().
|
private |
Definition at line 84 of file PipeWindows.h.
Referenced by CloseReadFileDescriptor(), CreateNew(), OpenNamedPipe(), PipeWindows(), ReadWithTimeout(), and ReleaseReadFileDescriptor().
|
private |
Definition at line 79 of file PipeWindows.h.
Referenced by CanWrite(), CloseWriteFileDescriptor(), GetWriteNativeHandle(), GetWritePipe(), OpenNamedPipe(), PipeWindows(), ReleaseWriteFileDescriptor(), and WriteWithTimeout().
|
private |
Definition at line 82 of file PipeWindows.h.
Referenced by CloseWriteFileDescriptor(), GetWriteFileDescriptor(), OpenNamedPipe(), PipeWindows(), and ReleaseWriteFileDescriptor().
|
private |
Definition at line 85 of file PipeWindows.h.
Referenced by CloseWriteFileDescriptor(), OpenNamedPipe(), PipeWindows(), ReleaseWriteFileDescriptor(), and WriteWithTimeout().