summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-08-09 18:56:45 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-08-09 18:56:45 +0000
commit4c1e92064026cb3ca690cd26f1288b3c6f3af2d5 (patch)
treef2f90429725577c582dfc462e5d861f988267e85 /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
parentd7f41b7f66ab25db2b654665576efa3d86910d29 (diff)
downloadbcm5719-llvm-4c1e92064026cb3ca690cd26f1288b3c6f3af2d5.tar.gz
bcm5719-llvm-4c1e92064026cb3ca690cd26f1288b3c6f3af2d5.zip
Fix a crash while running the test suite. Need to check the (LogSP)log shared pointer before using it.
llvm-svn: 137136
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 34efe2fe962..a6701127ae1 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -451,7 +451,8 @@ ProcessGDBRemote::DoLaunch
error = StartDebugserverProcess (host_port);
if (error.Fail())
{
- log->Printf("failed to start debugserver process: %s", error.AsCString());
+ if (log)
+ log->Printf("failed to start debugserver process: %s", error.AsCString());
return error;
}
@@ -550,7 +551,8 @@ ProcessGDBRemote::DoLaunch
if (GetID() == LLDB_INVALID_PROCESS_ID)
{
- log->Printf("failed to connect to debugserver: %s", error.AsCString());
+ if (log)
+ log->Printf("failed to connect to debugserver: %s", error.AsCString());
KillDebugserverProcess ();
return error;
}
@@ -568,7 +570,8 @@ ProcessGDBRemote::DoLaunch
}
else
{
- log->Printf("failed to connect to debugserver: %s", error.AsCString());
+ if (log)
+ log->Printf("failed to connect to debugserver: %s", error.AsCString());
}
}
else
OpenPOWER on IntegriCloud