From b5363110c7a550dccc9d163ae49c2ffd4fc490e2 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Wed, 12 Nov 2014 18:49:54 +0000 Subject: 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 --- lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp') 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; -- cgit v1.2.3