Cleaned up the inline stack frame code one more time to prepare for inlined
code stepping. Also we now store the stack frames for the current and previous
stops in the thread in std::auto_ptr objects. When we create a thread stack
frame list we pass the previous frame into it so it can re-use the frames
and maintain will allow for variable changes to be detected. I will implement
the stack frame reuse next.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112152 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/Thread.cpp b/source/Target/Thread.cpp
index 97dd52f..ff3cf6d 100644
--- a/source/Target/Thread.cpp
+++ b/source/Target/Thread.cpp
@@ -49,7 +49,7 @@
     m_plan_stack (),
     m_immediate_plan_stack(),
     m_completed_plan_stack(),
-    m_frames_sp (),
+    m_curr_frames_ap (),
     m_resume_signal (LLDB_INVALID_SIGNAL_NUMBER),
     m_resume_state (eStateRunning),
     m_unwinder_ap ()
@@ -796,9 +796,9 @@
 StackFrameList &
 Thread::GetStackFrameList ()
 {
-    if (m_frames_sp.get() == NULL)
-        m_frames_sp.reset (new StackFrameList (*this, true));
-    return *m_frames_sp;
+    if (m_curr_frames_ap.get() == NULL)
+        m_curr_frames_ap.reset (new StackFrameList (*this, m_prev_frames_ap.release(), true));
+    return *m_curr_frames_ap;
 }
 
 
@@ -813,8 +813,7 @@
 void
 Thread::ClearStackFrames ()
 {
-    if (m_frames_sp)
-        m_frames_sp->Clear();
+    m_prev_frames_ap = m_curr_frames_ap;
 }
 
 lldb::StackFrameSP