Make sure that if a CallFunction thread plan crashes while running in the "run to address" mode, and it
is an auto-discard thread plan, the plan stack unwinds properly.

llvm-svn: 124306
diff --git a/lldb/source/Target/ThreadPlanCallFunction.cpp b/lldb/source/Target/ThreadPlanCallFunction.cpp
index 44f44ed..d3b62e6 100644
--- a/lldb/source/Target/ThreadPlanCallFunction.cpp
+++ b/lldb/source/Target/ThreadPlanCallFunction.cpp
@@ -149,6 +149,7 @@
         ClearBreakpoints();
         if (log && log->GetVerbose())
             ReportRegisterState ("Restoring thread state after function call.  Restored register state:");
+
     }
     else
     {
@@ -236,7 +237,10 @@
     else
     {
         // If the subplan is running, any crashes are attributable to us.
-        return (m_subplan_sp.get() != NULL);
+        // If we want to discard the plan, then we say we explain the stop
+        // but if we are going to be discarded, let whoever is above us
+        // explain the stop.
+        return ((m_subplan_sp.get() != NULL) && !OkayToDiscard());
     }
 }