summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/ThreadPlanCallFunction.cpp
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-08-10 17:58:11 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-08-10 17:58:11 +0000
commit9e916e8096e349cb3fb658411a59bf0b4896d9d2 (patch)
tree2456c6e3f2ab25d2dfd986853a1cfb256abeb5a8 /lldb/source/Target/ThreadPlanCallFunction.cpp
parent3ff111c12da2c8a23de4099d8398265ba72caff8 (diff)
downloadbcm5719-llvm-9e916e8096e349cb3fb658411a59bf0b4896d9d2.tar.gz
bcm5719-llvm-9e916e8096e349cb3fb658411a59bf0b4896d9d2.zip
Check log shared pointer before using it.
llvm-svn: 137228
Diffstat (limited to 'lldb/source/Target/ThreadPlanCallFunction.cpp')
-rw-r--r--lldb/source/Target/ThreadPlanCallFunction.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/lldb/source/Target/ThreadPlanCallFunction.cpp b/lldb/source/Target/ThreadPlanCallFunction.cpp
index 07608726908..8ec93b98735 100644
--- a/lldb/source/Target/ThreadPlanCallFunction.cpp
+++ b/lldb/source/Target/ThreadPlanCallFunction.cpp
@@ -69,7 +69,8 @@ ThreadPlanCallFunction::ThreadPlanCallFunction (Thread &thread,
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 @@ ThreadPlanCallFunction::ThreadPlanCallFunction (Thread &thread,
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 @@ ThreadPlanCallFunction::ThreadPlanCallFunction (Thread &thread,
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 @@ ThreadPlanCallFunction::ThreadPlanCallFunction (Thread &thread,
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();
OpenPOWER on IntegriCloud