summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp')
-rw-r--r--lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
index bc738d748a1..dae33f6257d 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
@@ -221,7 +221,7 @@ bool ProcessKDP::GetHostArchitecture(ArchSpec &arch) {
return false;
}
-Error ProcessKDP::DoConnectRemote(Stream *strm, const char *remote_url) {
+Error ProcessKDP::DoConnectRemote(Stream *strm, llvm::StringRef remote_url) {
Error error;
// Don't let any JIT happen when doing KDP as we can't allocate
@@ -229,8 +229,8 @@ Error ProcessKDP::DoConnectRemote(Stream *strm, const char *remote_url) {
// already be handling exceptions
SetCanJIT(false);
- if (remote_url == NULL || remote_url[0] == '\0') {
- error.SetErrorStringWithFormat("invalid connection URL '%s'", remote_url);
+ if (remote_url.empty()) {
+ error.SetErrorStringWithFormat("empty connection URL");
return error;
}
@@ -360,7 +360,8 @@ Error ProcessKDP::DoConnectRemote(Stream *strm, const char *remote_url) {
}
} else {
if (error.Success())
- error.SetErrorStringWithFormat("failed to connect to '%s'", remote_url);
+ error.SetErrorStringWithFormat("failed to connect to '%s'",
+ remote_url.str().c_str());
}
if (error.Fail())
m_comm.Disconnect();
OpenPOWER on IntegriCloud