summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 5b6f9794f5a..8ed7e45f1a2 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -3562,15 +3562,22 @@ ProcessGDBRemote::LaunchAndConnectToDebugserver (const ProcessInfo &process_info
// Set hostname being NULL to do the reverse connect where debugserver
// will bind to port zero and it will communicate back to us the port
// that we will connect to
- const char *hostname = NULL;
+ const char *hostname = nullptr;
uint16_t port = 0;
#endif
- error = m_gdb_comm.StartDebugserverProcess (hostname,
- port,
+ StreamString url_str;
+ const char* url = nullptr;
+ if (hostname != nullptr)
+ {
+ url_str.Printf("%s:%u", hostname, port);
+ url = url_str.GetData();
+ }
+
+ error = m_gdb_comm.StartDebugserverProcess (url,
GetTarget().GetPlatform().get(),
debugserver_launch_info,
- port);
+ &port);
if (error.Success ())
m_debugserver_pid = debugserver_launch_info.GetProcessID();
OpenPOWER on IntegriCloud