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
This commit is contained in:
parent
0c9aa57a07
commit
b5363110c7
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue