diff --git a/lldb/source/Target/StackFrame.cpp b/lldb/source/Target/StackFrame.cpp index 6d2699d58b13..874f46bc8327 100644 --- a/lldb/source/Target/StackFrame.cpp +++ b/lldb/source/Target/StackFrame.cpp @@ -136,14 +136,19 @@ StackFrame::StackFrame m_flags.Set (eSymbolContextTarget); } - if (m_sc.module_sp.get() == NULL && pc_addr.GetSection()) + Module *pc_module = pc_addr.GetModule(); + if (m_sc.module_sp.get() == NULL || m_sc.module_sp.get() != pc_module) { - Module *pc_module = pc_addr.GetSection()->GetModule(); if (pc_module) { m_sc.module_sp = pc_module->GetSP(); m_flags.Set (eSymbolContextModule); } + else + { + m_sc.module_sp.reset(); + } + } }