|
LLDB mainline
|
A server that speaks a debugging protocol. More...
#include <SBProtocolServer.h>
Public Member Functions | |
| SBProtocolServer () | |
| SBProtocolServer (const SBProtocolServer &rhs) | |
| SBProtocolServer & | operator= (const SBProtocolServer &rhs) |
| ~SBProtocolServer () | |
| operator bool () const | |
| bool | IsValid () const |
| lldb::SBError | Start (const char *connection_uri) |
Starts listening for clients on connection_uri, which must be an accepting URI such as "listen://[host]:port" or "accept:///path". | |
| lldb::SBError | Stop () |
| const char * | GetConnectionURI () |
| Returns the URI clients can connect to, valid after a successful Start, or nullptr if the server is not listening. | |
Static Public Member Functions | |
| static SBProtocolServer | Create (const char *protocol, lldb::SBError &error) |
Returns the protocol server for protocol, creating it if this process does not already have one. | |
Private Attributes | |
| std::unique_ptr< lldb_private::SBProtocolServerImpl > | m_opaque_up |
A server that speaks a debugging protocol.
Protocol servers are shared across debuggers. Creating a server for a protocol that already has one hands back the existing server.
Definition at line 24 of file SBProtocolServer.h.
| SBProtocolServer::SBProtocolServer | ( | ) |
Definition at line 31 of file SBProtocolServer.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_up.
Referenced by Create(), operator=(), SBProtocolServer(), and ~SBProtocolServer().
| SBProtocolServer::SBProtocolServer | ( | const SBProtocolServer & | rhs | ) |
Definition at line 36 of file SBProtocolServer.cpp.
References LLDB_INSTRUMENT_VA, m_opaque_up, and SBProtocolServer().
|
default |
References Create(), error(), GetConnectionURI(), IsValid(), SBProtocolServer(), Start(), and Stop().
|
static |
Returns the protocol server for protocol, creating it if this process does not already have one.
On failure error is set.
Definition at line 51 of file SBProtocolServer.cpp.
References error(), lldb_private::ProtocolServer::GetOrCreate(), lldb_private::ProtocolServer::GetSupportedProtocols(), LLDB_INSTRUMENT_VA, m_opaque_up, and SBProtocolServer().
Referenced by ~SBProtocolServer().
| const char * SBProtocolServer::GetConnectionURI | ( | ) |
Returns the URI clients can connect to, valid after a successful Start, or nullptr if the server is not listening.
Definition at line 144 of file SBProtocolServer.cpp.
References lldb_private::Socket::GetListeningConnectionURI(), lldb_private::StringPool::GetSystemPool(), lldb_private::StringPoolRef::Intern(), LLDB_INSTRUMENT_VA, and m_opaque_up.
Referenced by ~SBProtocolServer().
| bool SBProtocolServer::IsValid | ( | ) | const |
Definition at line 81 of file SBProtocolServer.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_up.
Referenced by ~SBProtocolServer().
|
explicit |
Definition at line 75 of file SBProtocolServer.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_up.
| SBProtocolServer & SBProtocolServer::operator= | ( | const SBProtocolServer & | rhs | ) |
Definition at line 41 of file SBProtocolServer.cpp.
References LLDB_INSTRUMENT_VA, m_opaque_up, and SBProtocolServer().
| SBError SBProtocolServer::Start | ( | const char * | connection_uri | ) |
Starts listening for clients on connection_uri, which must be an accepting URI such as "listen://[host]:port" or "accept:///path".
Definition at line 87 of file SBProtocolServer.cpp.
References error(), lldb_private::Socket::GetProtocolAndMode(), LLDB_INSTRUMENT_VA, m_opaque_up, lldb_private::Socket::ModeAccept, lldb_private::ProtocolServer::Connection::name, lldb_private::URI::Parse(), lldb_private::ProtocolServer::Connection::protocol, and lldb_private::Socket::ProtocolUnixDomain.
Referenced by ~SBProtocolServer().
| SBError SBProtocolServer::Stop | ( | ) |
Definition at line 129 of file SBProtocolServer.cpp.
References error(), LLDB_INSTRUMENT_VA, and m_opaque_up.
Referenced by ~SBProtocolServer().
|
private |
Definition at line 49 of file SBProtocolServer.h.
Referenced by Create(), GetConnectionURI(), IsValid(), operator bool(), operator=(), SBProtocolServer(), SBProtocolServer(), Start(), and Stop().