Fixed a case where a stack frame could lose track
of its own target.
<rdar://problem/13121412>
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@175794 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/StackFrame.cpp b/source/Target/StackFrame.cpp
index fd95882..2cc46ef 100644
--- a/source/Target/StackFrame.cpp
+++ b/source/Target/StackFrame.cpp
@@ -452,7 +452,12 @@
// function, block, line entry or symbol, so we can safely call
// ResolveSymbolContextForAddress with our symbol context member m_sc.
if (m_sc.target_sp)
+ {
+ // FIXME This call erases m_sc.target_sp and will never restore it. Back it up.
+ TargetSP target_sp = m_sc.target_sp;
resolved |= m_sc.target_sp->GetImages().ResolveSymbolContextForAddress (lookup_addr, resolve_scope, m_sc);
+ m_sc.target_sp = target_sp;
+ }
}
// Update our internal flags so we remember what we have tried to locate so