summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2016-12-07 23:51:49 +0000
committerGreg Clayton <gclayton@apple.com>2016-12-07 23:51:49 +0000
commit3ce7e99680bfcb021a4a125d40e9e0dbceb6e323 (patch)
tree74d43f35e09ab5b29cee9b1170a44e3a796490eb /lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
parent24fb20c13d2e3a7eb6a787dec1c16639d873452f (diff)
downloadbcm5719-llvm-3ce7e99680bfcb021a4a125d40e9e0dbceb6e323.tar.gz
bcm5719-llvm-3ce7e99680bfcb021a4a125d40e9e0dbceb6e323.zip
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
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