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

#include <PipeWindows.h>

Inheritance diagram for lldb_private::PipeWindows:
Inheritance graph
[legend]
Collaboration diagram for lldb_private::PipeWindows:
Collaboration graph
[legend]

Public Member Functions

 PipeWindows ()
 
 PipeWindows (lldb::pipe_t read, lldb::pipe_t write)
 
 ~PipeWindows () override
 
Status CreateNew (bool child_process_inherit) override
 
Status CreateNewNamed (bool child_process_inherit)
 
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 Write (const void *buf, size_t size, 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 ()
 
Status OpenAsWriter (llvm::StringRef name, bool child_process_inherit)
 
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
 

Detailed Description

Definition at line 22 of file PipeWindows.h.

Constructor & Destructor Documentation

◆ PipeWindows() [1/2]

PipeWindows::PipeWindows ( )

Definition at line 30 of file PipeWindows.cpp.

References m_read_overlapped, and m_write_overlapped.

◆ PipeWindows() [2/2]

PipeWindows::PipeWindows ( lldb::pipe_t  read,
lldb::pipe_t  write 
)

◆ ~PipeWindows()

PipeWindows::~PipeWindows ( )
override

Definition at line 66 of file PipeWindows.cpp.

References Close().

Member Function Documentation

◆ CanRead()

bool PipeWindows::CanRead ( ) const
overridevirtual

◆ CanWrite()

bool PipeWindows::CanWrite ( ) const
overridevirtual

◆ Close()

void PipeWindows::Close ( )
overridevirtual

Implements lldb_private::PipeBase.

Definition at line 261 of file PipeWindows.cpp.

References CloseReadFileDescriptor(), and CloseWriteFileDescriptor().

Referenced by ~PipeWindows().

◆ CloseReadFileDescriptor()

void PipeWindows::CloseReadFileDescriptor ( )
overridevirtual

Implements lldb_private::PipeBase.

Definition at line 238 of file PipeWindows.cpp.

References CanRead(), kInvalidDescriptor, m_read, m_read_fd, and m_read_overlapped.

Referenced by Close(), and CreateNew().

◆ CloseWriteFileDescriptor()

void PipeWindows::CloseWriteFileDescriptor ( )
overridevirtual

Implements lldb_private::PipeBase.

Definition at line 251 of file PipeWindows.cpp.

References CanWrite(), kInvalidDescriptor, m_write, m_write_fd, and m_write_overlapped.

Referenced by Close().

◆ CreateNew() [1/2]

Status PipeWindows::CreateNew ( bool  child_process_inherit)
overridevirtual

◆ CreateNew() [2/2]

Status PipeWindows::CreateNew ( llvm::StringRef  name,
bool  child_process_inherit 
)
overridevirtual

◆ CreateNewNamed()

Status PipeWindows::CreateNewNamed ( bool  child_process_inherit)

Definition at line 86 of file PipeWindows.cpp.

References CreateNew(), and string().

◆ CreateWithUniqueName()

Status PipeWindows::CreateWithUniqueName ( llvm::StringRef  prefix,
bool  child_process_inherit,
llvm::SmallVectorImpl< char > &  name 
)
overridevirtual

Implements lldb_private::PipeBase.

Definition at line 133 of file PipeWindows.cpp.

References CreateNew(), lldb::eErrorTypeWin32, and error().

◆ Delete()

Status PipeWindows::Delete ( llvm::StringRef  name)
overridevirtual

Implements lldb_private::PipeBase.

Definition at line 266 of file PipeWindows.cpp.

◆ GetReadFileDescriptor()

int PipeWindows::GetReadFileDescriptor ( ) const
overridevirtual

Implements lldb_private::PipeBase.

Definition at line 212 of file PipeWindows.cpp.

References m_read_fd.

◆ GetReadNativeHandle()

HANDLE PipeWindows::GetReadNativeHandle ( )

Definition at line 273 of file PipeWindows.cpp.

References m_read.

◆ GetReadPipe()

lldb::pipe_t lldb_private::PipeWindows::GetReadPipe ( ) const
inlineoverridevirtual

Implements lldb_private::PipeBase.

Definition at line 49 of file PipeWindows.h.

References m_read.

◆ GetWriteFileDescriptor()

int PipeWindows::GetWriteFileDescriptor ( ) const
overridevirtual

Implements lldb_private::PipeBase.

Definition at line 214 of file PipeWindows.cpp.

References m_write_fd.

◆ GetWriteNativeHandle()

HANDLE PipeWindows::GetWriteNativeHandle ( )

Definition at line 276 of file PipeWindows.cpp.

References m_write.

◆ GetWritePipe()

lldb::pipe_t lldb_private::PipeWindows::GetWritePipe ( ) const
inlineoverridevirtual

Implements lldb_private::PipeBase.

Definition at line 50 of file PipeWindows.h.

References m_write.

◆ OpenAsReader()

Status PipeWindows::OpenAsReader ( llvm::StringRef  name,
bool  child_process_inherit 
)
overridevirtual

Implements lldb_private::PipeBase.

Definition at line 157 of file PipeWindows.cpp.

References CanRead(), lldb::eErrorTypeWin32, and OpenNamedPipe().

◆ OpenAsWriterWithTimeout()

Status PipeWindows::OpenAsWriterWithTimeout ( llvm::StringRef  name,
bool  child_process_inherit,
const std::chrono::microseconds &  timeout 
)
overridevirtual

Implements lldb_private::PipeBase.

Definition at line 166 of file PipeWindows.cpp.

References CanWrite(), lldb::eErrorTypeWin32, and OpenNamedPipe().

◆ OpenNamedPipe()

Status PipeWindows::OpenNamedPipe ( llvm::StringRef  name,
bool  child_process_inherit,
bool  is_read 
)
private

◆ ReadWithTimeout()

Status PipeWindows::ReadWithTimeout ( void *  buf,
size_t  size,
const std::chrono::microseconds &  timeout,
size_t &  bytes_read 
)
overridevirtual

Implements lldb_private::PipeBase.

Definition at line 278 of file PipeWindows.cpp.

References CanRead(), lldb::eErrorTypeWin32, m_read, and m_read_overlapped.

◆ ReleaseReadFileDescriptor()

int PipeWindows::ReleaseReadFileDescriptor ( )
overridevirtual

Implements lldb_private::PipeBase.

Definition at line 216 of file PipeWindows.cpp.

References CanRead(), kInvalidDescriptor, m_read, m_read_fd, and m_read_overlapped.

◆ ReleaseWriteFileDescriptor()

int PipeWindows::ReleaseWriteFileDescriptor ( )
overridevirtual

Implements lldb_private::PipeBase.

Definition at line 228 of file PipeWindows.cpp.

References CanWrite(), kInvalidDescriptor, m_write, m_write_fd, and m_write_overlapped.

◆ Write()

Status PipeWindows::Write ( const void *  buf,
size_t  size,
size_t &  bytes_written 
)
overridevirtual

Implements lldb_private::PipeBase.

Definition at line 322 of file PipeWindows.cpp.

References CanWrite(), lldb::eErrorTypeWin32, m_write, and m_write_overlapped.

Member Data Documentation

◆ kInvalidDescriptor

const int lldb_private::PipeWindows::kInvalidDescriptor = -1
static

◆ m_read

HANDLE lldb_private::PipeWindows::m_read
private

◆ m_read_fd

int lldb_private::PipeWindows::m_read_fd
private

◆ m_read_overlapped

OVERLAPPED lldb_private::PipeWindows::m_read_overlapped
private

◆ m_write

HANDLE lldb_private::PipeWindows::m_write
private

◆ m_write_fd

int lldb_private::PipeWindows::m_write_fd
private

◆ m_write_overlapped

OVERLAPPED lldb_private::PipeWindows::m_write_overlapped
private

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