Fixed DoConnectRemote issues where ProcessKDP wasn't switched over to use the version that needed a StringRef as the URL, and also updated all virtual functions to say "override" to make sure this doesn't happen again.
llvm-svn: 288999
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
index bc738d7..dae33f6 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
@@ -221,7 +221,7 @@
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 @@
// 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 @@
}
} 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();