diff options
author | Ed Maste <emaste@freebsd.org> | 2014-11-12 18:49:54 +0000 |
---|---|---|
committer | Ed Maste <emaste@freebsd.org> | 2014-11-12 18:49:54 +0000 |
commit | b5363110c7a550dccc9d163ae49c2ffd4fc490e2 (patch) | |
tree | c438f59cf6df266ddd4862d7d0f462adcc6047d4 /lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp | |
parent | 0c9aa57a0767b053276270e997f22952d2f15924 (diff) | |
download | bcm5719-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.cpp | 3 |
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; |