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]

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
 

Detailed Description

Definition at line 22 of file PipeWindows.h.

Constructor & Destructor Documentation

◆ PipeWindows() [1/2]

PipeWindows::PipeWindows ( )

Definition at line 28 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 67 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 255 of file PipeWindows.cpp.

References CloseReadFileDescriptor(), and CloseWriteFileDescriptor().

Referenced by ~PipeWindows().

◆ CloseReadFileDescriptor()

void PipeWindows::CloseReadFileDescriptor ( )
overridevirtual

Implements lldb_private::PipeBase.

Definition at line 229 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 242 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

Implements lldb_private::PipeBase.

Definition at line 69 of file PipeWindows.cpp.

References CreateNew(), and g_pipe_serial().

Referenced by CreateNew(), and CreateWithUniqueName().

◆ CreateNew() [2/2]

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

◆ CreateWithUniqueName()

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

Implements lldb_private::PipeBase.

Definition at line 121 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 260 of file PipeWindows.cpp.

◆ GetReadFileDescriptor()

int PipeWindows::GetReadFileDescriptor ( ) const
overridevirtual

Implements lldb_private::PipeBase.

Definition at line 201 of file PipeWindows.cpp.

References m_read_fd.

◆ GetReadNativeHandle()

HANDLE PipeWindows::GetReadNativeHandle ( )

Definition at line 267 of file PipeWindows.cpp.

References m_read.

◆ GetReadPipe()

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

Implements lldb_private::PipeBase.

Definition at line 48 of file PipeWindows.h.

References m_read.

◆ GetWriteFileDescriptor()

int PipeWindows::GetWriteFileDescriptor ( ) const
overridevirtual

Implements lldb_private::PipeBase.

Definition at line 203 of file PipeWindows.cpp.

References m_write_fd.

◆ GetWriteNativeHandle()

HANDLE PipeWindows::GetWriteNativeHandle ( )

Definition at line 270 of file PipeWindows.cpp.

References m_write.

◆ GetWritePipe()

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

Implements lldb_private::PipeBase.

Definition at line 49 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 145 of file PipeWindows.cpp.

References CanRead(), 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 154 of file PipeWindows.cpp.

References CanWrite(), 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 272 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 205 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 217 of file PipeWindows.cpp.

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

◆ WriteWithTimeout()

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

Implements lldb_private::PipeBase.

Definition at line 323 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: