Fix a crash while running the test suite. Need to check the (LogSP)log shared pointer before using it.

llvm-svn: 137136
This commit is contained in:
Johnny Chen 2011-08-09 18:56:45 +00:00
parent d7f41b7f66
commit 4c1e920640
1 changed files with 6 additions and 3 deletions

View File

@ -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