Fixed a bug in which expression-local variables were
treated as being permanently resident in target
memory.  In fact, since the expression's stack frame
is deleted and potentially re-used after the
expression completes, the variables need to be treated
as being freeze-dried.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131104 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/ThreadPlanCallFunction.cpp b/source/Target/ThreadPlanCallFunction.cpp
index a5e1c1a..83b8270 100644
--- a/source/Target/ThreadPlanCallFunction.cpp
+++ b/source/Target/ThreadPlanCallFunction.cpp
@@ -49,7 +49,8 @@
     m_args (NULL),
     m_process (thread.GetProcess()),
     m_thread (thread),
-    m_takedown_done (false)
+    m_takedown_done (false),
+    m_function_sp(NULL)
 {
     SetOkayToDiscard (discard_on_error);
 
@@ -64,7 +65,7 @@
     
     SetBreakpoints();
     
-    lldb::addr_t spBelowRedZone = thread.GetRegisterContext()->GetSP() - abi->GetRedZoneSize();
+    m_function_sp = thread.GetRegisterContext()->GetSP() - abi->GetRedZoneSize();
     
     ModuleSP executableModuleSP (target.GetExecutableModule());
 
@@ -110,7 +111,7 @@
     lldb::addr_t FunctionLoadAddr = m_function_addr.GetLoadAddress(&target);
         
     if (!abi->PrepareTrivialCall(thread, 
-                                 spBelowRedZone, 
+                                 m_function_sp, 
                                  FunctionLoadAddr, 
                                  StartLoadAddr, 
                                  m_arg_addr,