Don't cache the public stop reason, since it can change as plan completion gets processed.  That means GetStopReason needs to return a shared pointer, not a pointer to the thread's cached version.  Also allow the thread plans to get and set the thread private stop reason - that is usually more appropriate for the logic the thread plans need to do.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116892 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/ThreadPlanTestCondition.cpp b/source/Target/ThreadPlanTestCondition.cpp
index 30fe739..d66fff7 100644
--- a/source/Target/ThreadPlanTestCondition.cpp
+++ b/source/Target/ThreadPlanTestCondition.cpp
@@ -110,9 +110,9 @@
     Process::ProcessEventData *new_data = new Process::ProcessEventData (m_thread.GetProcess().GetSP(), eStateStopped);
     event_ptr->SetData(new_data);
     event_ptr->SetType(Process::eBroadcastBitStateChanged);
-    m_thread.SetStopInfo(StopInfo::CreateStopReasonWithBreakpointSiteID (m_thread, 
-                                                                         m_break_loc_sp->GetBreakpointSite()->GetID(),
-                                                                         m_did_stop));
+    SetStopInfo(StopInfo::CreateStopReasonWithBreakpointSiteID (m_thread, 
+                                                                m_break_loc_sp->GetBreakpointSite()->GetID(),
+                                                                m_did_stop));
     if (m_did_stop)
     {
         Process::ProcessEventData::SetRestartedInEvent (event_ptr, false);