summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
diff options
context:
space:
mode:
authorAaron Smith <aaron.smith@microsoft.com>2019-02-14 08:59:04 +0000
committerAaron Smith <aaron.smith@microsoft.com>2019-02-14 08:59:04 +0000
commitbc472895111510bbf4be6502a7f3e58eb2a5e837 (patch)
tree874d704f00b8e382e5d9a5fb982daa3db7c72d57 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
parent91c4fa9d32f279f21cdfeb30a10936365fdf42fb (diff)
downloadbcm5719-llvm-bc472895111510bbf4be6502a7f3e58eb2a5e837.tar.gz
bcm5719-llvm-bc472895111510bbf4be6502a7f3e58eb2a5e837.zip
[gdb-remote] Sanity check platform pointer
llvm-svn: 354012
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
index f5956c5c895..5a0f962d034 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
@@ -979,8 +979,11 @@ Status GDBRemoteCommunication::StartDebugserverProcess(
g_debugserver_file_spec = debugserver_file_spec;
} else {
- debugserver_file_spec =
- platform->LocateExecutable(DEBUGSERVER_BASENAME);
+ if (platform)
+ debugserver_file_spec =
+ platform->LocateExecutable(DEBUGSERVER_BASENAME);
+ else
+ debugserver_file_spec.Clear();
if (debugserver_file_spec) {
// Platform::LocateExecutable() wouldn't return a path if it doesn't
// exist
OpenPOWER on IntegriCloud