summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
diff options
context:
space:
mode:
authorEd Maste <emaste@freebsd.org>2014-11-12 18:49:54 +0000
committerEd Maste <emaste@freebsd.org>2014-11-12 18:49:54 +0000
commitb5363110c7a550dccc9d163ae49c2ffd4fc490e2 (patch)
treec438f59cf6df266ddd4862d7d0f462adcc6047d4 /lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
parent0c9aa57a0767b053276270e997f22952d2f15924 (diff)
downloadbcm5719-llvm-b5363110c7a550dccc9d163ae49c2ffd4fc490e2.tar.gz
bcm5719-llvm-b5363110c7a550dccc9d163ae49c2ffd4fc490e2.zip
Avoid crash in InitializeNonZerothFrame if no module found
After r221575 TestCallStopAndContinue and TestCallThatRestarts started crashing on FreeBSD with a null temporary_module_sp in RegisterContextLLDB::InitializeNonZerothFrame(). llvm-svn: 221805
Diffstat (limited to 'lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp')
-rw-r--r--lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
index 93ef56f022f..c6951b46d9b 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
+++ b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
@@ -501,7 +501,8 @@ RegisterContextLLDB::InitializeNonZerothFrame()
uint32_t resolve_scope = eSymbolContextFunction | eSymbolContextSymbol;
ModuleSP temporary_module_sp = temporary_pc.GetModule();
- if (temporary_module_sp->ResolveSymbolContextForAddress (temporary_pc, resolve_scope, m_sym_ctx) & resolve_scope)
+ if (temporary_module_sp &&
+ temporary_module_sp->ResolveSymbolContextForAddress (temporary_pc, resolve_scope, m_sym_ctx) & resolve_scope)
{
if (m_sym_ctx.GetAddressRange (resolve_scope, 0, false, addr_range))
m_sym_ctx_valid = true;
OpenPOWER on IntegriCloud