Make lldb-gdbserver to take explicit socket scheme as command line argument.
http://reviews.llvm.org/D14126
llvm-svn: 251547
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
index 54aad10..19a29b4 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
@@ -46,9 +46,11 @@
//----------------------------------------------------------------------
// GDBRemoteCommunicationServerPlatform constructor
//----------------------------------------------------------------------
-GDBRemoteCommunicationServerPlatform::GDBRemoteCommunicationServerPlatform(const Socket::SocketProtocol socket_protocol) :
+GDBRemoteCommunicationServerPlatform::GDBRemoteCommunicationServerPlatform(const Socket::SocketProtocol socket_protocol,
+ const char* socket_scheme) :
GDBRemoteCommunicationServerCommon ("gdb-remote.server", "gdb-remote.server.rx_packet"),
m_socket_protocol(socket_protocol),
+ m_socket_scheme(socket_scheme),
m_spawned_pids_mutex (Mutex::eMutexTypeRecursive),
m_platform_sp (Platform::GetHostPlatform ()),
m_port_map (),
@@ -150,6 +152,7 @@
std::ostringstream url;
uint16_t* port_ptr = &port;
+ url << m_socket_scheme << "://";
if (m_socket_protocol == Socket::ProtocolTcp)
url << platform_ip << ":" << port;
else
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h
index 95fa18d..6e8f5b0 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h
@@ -29,7 +29,8 @@
public:
typedef std::map<uint16_t, lldb::pid_t> PortMap;
- GDBRemoteCommunicationServerPlatform(const Socket::SocketProtocol socket_protocol);
+ GDBRemoteCommunicationServerPlatform(const Socket::SocketProtocol socket_protocol,
+ const char* socket_scheme);
~GDBRemoteCommunicationServerPlatform() override;
@@ -67,6 +68,7 @@
protected:
const Socket::SocketProtocol m_socket_protocol;
+ const std::string m_socket_scheme;
Mutex m_spawned_pids_mutex;
std::set<lldb::pid_t> m_spawned_pids;
lldb::PlatformSP m_platform_sp;