[Lldb-commits] [lldb] r137228 - /lldb/trunk/source/Target/ThreadPlanCallFunction.cpp
Johnny Chen
johnny.chen at apple.com
Wed Aug 10 10:58:11 PDT 2011
Author: johnny
Date: Wed Aug 10 12:58:11 2011
New Revision: 137228
URL: http://llvm.org/viewvc/llvm-project?rev=137228&view=rev
Log:
Check log shared pointer before using it.
Modified:
lldb/trunk/source/Target/ThreadPlanCallFunction.cpp
Modified: lldb/trunk/source/Target/ThreadPlanCallFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlanCallFunction.cpp?rev=137228&r1=137227&r2=137228&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadPlanCallFunction.cpp (original)
+++ lldb/trunk/source/Target/ThreadPlanCallFunction.cpp Wed Aug 10 12:58:11 2011
@@ -69,7 +69,8 @@
if (!executableModuleSP)
{
- log->Printf ("Can't execute code without an executable module.");
+ if (log)
+ log->Printf ("Can't execute code without an executable module.");
return;
}
else
@@ -77,15 +78,17 @@
ObjectFile *objectFile = executableModuleSP->GetObjectFile();
if (!objectFile)
{
- log->Printf ("Could not find object file for module \"%s\".",
- executableModuleSP->GetFileSpec().GetFilename().AsCString());
+ if (log)
+ log->Printf ("Could not find object file for module \"%s\".",
+ executableModuleSP->GetFileSpec().GetFilename().AsCString());
return;
}
m_start_addr = objectFile->GetEntryPointAddress();
if (!m_start_addr.IsValid())
{
- log->Printf ("Could not find entry point address for executable module \"%s\".",
- executableModuleSP->GetFileSpec().GetFilename().AsCString());
+ if (log)
+ log->Printf ("Could not find entry point address for executable module \"%s\".",
+ executableModuleSP->GetFileSpec().GetFilename().AsCString());
return;
}
}
@@ -182,7 +185,8 @@
if (!executableModuleSP)
{
- log->Printf ("Can't execute code without an executable module.");
+ if (log)
+ log->Printf ("Can't execute code without an executable module.");
return;
}
else
@@ -190,8 +194,9 @@
ObjectFile *objectFile = executableModuleSP->GetObjectFile();
if (!objectFile)
{
- log->Printf ("Could not find object file for module \"%s\".",
- executableModuleSP->GetFileSpec().GetFilename().AsCString());
+ if (log)
+ log->Printf ("Could not find object file for module \"%s\".",
+ executableModuleSP->GetFileSpec().GetFilename().AsCString());
return;
}
m_start_addr = objectFile->GetEntryPointAddress();
More information about the lldb-commits
mailing list