LLDB mainline
|
#include <SBCommunication.h>
Public Types | |
typedef void(* | ReadThreadBytesReceived) (void *baton, const void *src, size_t src_len) |
Public Member Functions | |
FLAGS_ANONYMOUS_ENUM () | |
SBCommunication () | |
SBCommunication (const char *broadcaster_name) | |
~SBCommunication () | |
operator bool () const | |
bool | IsValid () const |
lldb::SBBroadcaster | GetBroadcaster () |
lldb::ConnectionStatus | AdoptFileDesriptor (int fd, bool owns_fd) |
lldb::ConnectionStatus | Connect (const char *url) |
lldb::ConnectionStatus | Disconnect () |
bool | IsConnected () const |
bool | GetCloseOnEOF () |
void | SetCloseOnEOF (bool b) |
size_t | Read (void *dst, size_t dst_len, uint32_t timeout_usec, lldb::ConnectionStatus &status) |
size_t | Write (const void *src, size_t src_len, lldb::ConnectionStatus &status) |
bool | ReadThreadStart () |
bool | ReadThreadStop () |
bool | ReadThreadIsRunning () |
bool | SetReadThreadBytesReceivedCallback (ReadThreadBytesReceived callback, void *callback_baton) |
Static Public Member Functions | |
static const char * | GetBroadcasterClass () |
Private Member Functions | |
SBCommunication (const SBCommunication &)=delete | |
const SBCommunication & | operator= (const SBCommunication &)=delete |
Private Attributes | |
lldb_private::ThreadedCommunication * | m_opaque = nullptr |
bool | m_opaque_owned = false |
Definition at line 17 of file SBCommunication.h.
typedef void(* lldb::SBCommunication::ReadThreadBytesReceived) (void *baton, const void *src, size_t src_len) |
Definition at line 33 of file SBCommunication.h.
SBCommunication::SBCommunication | ( | ) |
Definition at line 19 of file SBCommunication.cpp.
References LLDB_INSTRUMENT_VA.
SBCommunication::SBCommunication | ( | const char * | broadcaster_name | ) |
Definition at line 21 of file SBCommunication.cpp.
References LLDB_INSTRUMENT_VA.
SBCommunication::~SBCommunication | ( | ) |
Definition at line 27 of file SBCommunication.cpp.
References m_opaque, and m_opaque_owned.
|
privatedelete |
ConnectionStatus SBCommunication::AdoptFileDesriptor | ( | int | fd, |
bool | owns_fd | ||
) |
Definition at line 70 of file SBCommunication.cpp.
References lldb_private::ThreadedCommunication::Disconnect(), lldb::eConnectionStatusLostConnection, lldb::eConnectionStatusNoConnection, lldb::eConnectionStatusSuccess, lldb_private::Communication::HasConnection(), lldb_private::Communication::IsConnected(), LLDB_INSTRUMENT_VA, m_opaque, and lldb_private::ThreadedCommunication::SetConnection().
ConnectionStatus SBCommunication::Connect | ( | const char * | url | ) |
Definition at line 59 of file SBCommunication.cpp.
References lldb_private::Communication::Connect(), lldb_private::Host::CreateDefaultConnection(), lldb::eConnectionStatusNoConnection, lldb_private::Communication::HasConnection(), LLDB_INSTRUMENT_VA, m_opaque, and lldb_private::ThreadedCommunication::SetConnection().
ConnectionStatus SBCommunication::Disconnect | ( | ) |
Definition at line 89 of file SBCommunication.cpp.
References lldb_private::ThreadedCommunication::Disconnect(), lldb::eConnectionStatusNoConnection, LLDB_INSTRUMENT_VA, and m_opaque.
|
inline |
< Sent when the communications connection is lost.
< Sent by the read thread when bytes become available.
< Sent by the read thread when it exits to inform clients.
< Sent by clients that need to cancel the read thread.
< Sent when data received makes a complete packet.
Definition at line 19 of file SBCommunication.h.
SBBroadcaster SBCommunication::GetBroadcaster | ( | ) |
Definition at line 163 of file SBCommunication.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque.
|
static |
Definition at line 170 of file SBCommunication.cpp.
References lldb_private::ConstString::AsCString(), lldb_private::ThreadedCommunication::GetStaticBroadcasterClass(), and LLDB_INSTRUMENT.
bool SBCommunication::GetCloseOnEOF | ( | ) |
Definition at line 44 of file SBCommunication.cpp.
References lldb_private::Communication::GetCloseOnEOF(), LLDB_INSTRUMENT_VA, and m_opaque.
bool SBCommunication::IsConnected | ( | ) | const |
Definition at line 98 of file SBCommunication.cpp.
References lldb_private::Communication::IsConnected(), LLDB_INSTRUMENT_VA, and m_opaque.
bool SBCommunication::IsValid | ( | ) | const |
Definition at line 34 of file SBCommunication.cpp.
References LLDB_INSTRUMENT_VA.
|
explicit |
Definition at line 38 of file SBCommunication.cpp.
References LLDB_INSTRUMENT_VA.
|
privatedelete |
size_t SBCommunication::Read | ( | void * | dst, |
size_t | dst_len, | ||
uint32_t | timeout_usec, | ||
lldb::ConnectionStatus & | status | ||
) |
Definition at line 104 of file SBCommunication.cpp.
References lldb::eConnectionStatusNoConnection, LLDB_INSTRUMENT_VA, m_opaque, lldb_private::ThreadedCommunication::Read(), and UINT32_MAX.
bool SBCommunication::ReadThreadIsRunning | ( | ) |
Definition at line 145 of file SBCommunication.cpp.
References LLDB_INSTRUMENT_VA, m_opaque, and lldb_private::ThreadedCommunication::ReadThreadIsRunning().
bool SBCommunication::ReadThreadStart | ( | ) |
Definition at line 133 of file SBCommunication.cpp.
References LLDB_INSTRUMENT_VA, m_opaque, and lldb_private::ThreadedCommunication::StartReadThread().
bool SBCommunication::ReadThreadStop | ( | ) |
Definition at line 139 of file SBCommunication.cpp.
References LLDB_INSTRUMENT_VA, m_opaque, and lldb_private::ThreadedCommunication::StopReadThread().
void SBCommunication::SetCloseOnEOF | ( | bool | b | ) |
Definition at line 52 of file SBCommunication.cpp.
References LLDB_INSTRUMENT_VA, m_opaque, and lldb_private::Communication::SetCloseOnEOF().
bool SBCommunication::SetReadThreadBytesReceivedCallback | ( | ReadThreadBytesReceived | callback, |
void * | callback_baton | ||
) |
Definition at line 151 of file SBCommunication.cpp.
References LLDB_INSTRUMENT_VA, m_opaque, and lldb_private::ThreadedCommunication::SetReadThreadBytesReceivedCallback().
size_t SBCommunication::Write | ( | const void * | src, |
size_t | src_len, | ||
lldb::ConnectionStatus & | status | ||
) |
Definition at line 120 of file SBCommunication.cpp.
References lldb::eConnectionStatusNoConnection, LLDB_INSTRUMENT_VA, m_opaque, and lldb_private::Communication::Write().
|
private |
Definition at line 78 of file SBCommunication.h.
Referenced by AdoptFileDesriptor(), Connect(), Disconnect(), GetBroadcaster(), GetCloseOnEOF(), IsConnected(), Read(), ReadThreadIsRunning(), ReadThreadStart(), ReadThreadStop(), SetCloseOnEOF(), SetReadThreadBytesReceivedCallback(), Write(), and ~SBCommunication().
|
private |
Definition at line 79 of file SBCommunication.h.
Referenced by ~SBCommunication().