diff options
author | Jim Ingham <jingham@apple.com> | 2010-10-20 00:39:53 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2010-10-20 00:39:53 +0000 |
commit | b15bfc753c67f7af5eee131da04f007fd5af91fb (patch) | |
tree | 033d69708f181695d5030ea293a62186510ec6fe | |
parent | 20f7ab72b1043fa288c5471dc846581d3a33d9ea (diff) | |
download | bcm5719-llvm-b15bfc753c67f7af5eee131da04f007fd5af91fb.tar.gz bcm5719-llvm-b15bfc753c67f7af5eee131da04f007fd5af91fb.zip |
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.
llvm-svn: 116892
-rw-r--r-- | lldb/include/lldb/Target/Thread.h | 16 | ||||
-rw-r--r-- | lldb/include/lldb/Target/ThreadPlan.h | 42 | ||||
-rw-r--r-- | lldb/include/lldb/Target/ThreadPlanStepOverBreakpoint.h | 4 | ||||
-rw-r--r-- | lldb/source/API/SBThread.cpp | 16 | ||||
-rw-r--r-- | lldb/source/Core/Debugger.cpp | 6 | ||||
-rw-r--r-- | lldb/source/Expression/ClangFunction.cpp | 6 | ||||
-rw-r--r-- | lldb/source/Target/Process.cpp | 6 | ||||
-rw-r--r-- | lldb/source/Target/Thread.cpp | 72 | ||||
-rw-r--r-- | lldb/source/Target/ThreadList.cpp | 10 | ||||
-rw-r--r-- | lldb/source/Target/ThreadPlanBase.cpp | 14 | ||||
-rw-r--r-- | lldb/source/Target/ThreadPlanStepInstruction.cpp | 6 | ||||
-rw-r--r-- | lldb/source/Target/ThreadPlanStepOut.cpp | 8 | ||||
-rw-r--r-- | lldb/source/Target/ThreadPlanStepRange.cpp | 6 | ||||
-rw-r--r-- | lldb/source/Target/ThreadPlanStepUntil.cpp | 12 | ||||
-rw-r--r-- | lldb/source/Target/ThreadPlanTestCondition.cpp | 6 |
15 files changed, 78 insertions, 152 deletions
diff --git a/lldb/include/lldb/Target/Thread.h b/lldb/include/lldb/Target/Thread.h index 8b520dbf139..0f9dd02f6ca 100644 --- a/lldb/include/lldb/Target/Thread.h +++ b/lldb/include/lldb/Target/Thread.h @@ -235,15 +235,9 @@ public: virtual bool MatchesSpec (const ThreadSpec *spec); - StopInfo * + lldb::StopInfoSP GetStopInfo (); - void - SetStopInfo (lldb::StopInfoSP stop_info_sp) - { - m_public_stop_info_sp = stop_info_sp; - } - bool ThreadStoppedForAReason (); @@ -650,18 +644,22 @@ protected: StackFrameList & GetStackFrameList (); + void + SetStopInfo (lldb::StopInfoSP stop_info_sp) + { + m_actual_stop_info_sp = stop_info_sp; + } + //------------------------------------------------------------------ // Classes that inherit from Process can see and modify these //------------------------------------------------------------------ Process & m_process; ///< The process that owns this thread. - lldb::StopInfoSP m_public_stop_info_sp; ///< The public stop reason for this thread lldb::StopInfoSP m_actual_stop_info_sp; ///< The private stop reason for this thread const uint32_t m_index_id; ///< A unique 1 based index assigned to each thread for easy UI/command line access. lldb::RegisterContextSP m_reg_context_sp; ///< The register context for this thread's current register state. lldb::StateType m_state; ///< The state of our process. mutable Mutex m_state_mutex; ///< Multithreaded protection for m_state. plan_stack m_plan_stack; ///< The stack of plans this thread is executing. - plan_stack m_immediate_plan_stack; ///< The plans that need to get executed before any other work gets done. plan_stack m_completed_plan_stack; ///< Plans that have been completed by this stop. They get deleted when the thread resumes. plan_stack m_discarded_plan_stack; ///< Plans that have been discarded by this stop. They get deleted when the thread resumes. std::auto_ptr<StackFrameList> m_curr_frames_ap; ///< The stack frames that get lazily populated after a thread stops. diff --git a/lldb/include/lldb/Target/ThreadPlan.h b/lldb/include/lldb/Target/ThreadPlan.h index 1f8bb8cd47e..a22d238174a 100644 --- a/lldb/include/lldb/Target/ThreadPlan.h +++ b/lldb/include/lldb/Target/ThreadPlan.h @@ -18,6 +18,7 @@ #include "lldb/lldb-private.h" #include "lldb/Core/UserID.h" #include "lldb/Host/Mutex.h" +#include "lldb/Target/Thread.h" namespace lldb_private { @@ -40,20 +41,6 @@ namespace lldb_private { // of the running process. // // -// DEPRECATED: This ended up causing a real hassle, too many cases where the immediate plan -// got stranded. So the better way to do this is to post any plans you need to do right before -// running in the PrepareToResume method. -//f -// Immediate Plans: -// -// One other complexity of the plan stack is that sometimes you need to do a piece of work immediately -// on resume, regardless of what other plans have been pushed on the stack while the process has -// been stopped. The classic example is stepping over a breakpoint. To that end the plan stack is -// actually two stacks, an "immediate" plan stack and the normal plan stack. A plan can indicate that it -// should go on the immediate plan stack by returning "true" from the IsImmediate method. -// -// END DEPRECATED... -// // Creating Plans: // // The thread plan is generally created and added to the plan stack through the QueueThreadPlanFor... API @@ -247,18 +234,6 @@ public: lldb::DescriptionLevel level) = 0; //------------------------------------------------------------------ - /// Returns whether this plan needs to be executed immediatly on resume. - /// - /// @return - /// \b true if the plan is immediate, \b false otherwise. - //------------------------------------------------------------------ - virtual bool - IsImmediate() const - { - return false; - } - - //------------------------------------------------------------------ /// Returns whether this plan could be successfully created. /// /// @param[in] error @@ -362,6 +337,21 @@ protected: ThreadPlan * GetPreviousPlan (); + + // This forwards the private Thread::GetPrivateStopReason which is generally what + // ThreadPlan's need to know. + + lldb::StopInfoSP + GetPrivateStopReason() + { + return m_thread.GetPrivateStopReason(); + } + + void + SetStopInfo (lldb::StopInfoSP stop_reason_sp) + { + m_thread.SetStopInfo (stop_reason_sp); + } Thread &m_thread; lldb::Vote m_stop_vote; diff --git a/lldb/include/lldb/Target/ThreadPlanStepOverBreakpoint.h b/lldb/include/lldb/Target/ThreadPlanStepOverBreakpoint.h index 3e13eef9789..334fb27331a 100644 --- a/lldb/include/lldb/Target/ThreadPlanStepOverBreakpoint.h +++ b/lldb/include/lldb/Target/ThreadPlanStepOverBreakpoint.h @@ -31,10 +31,6 @@ public: virtual bool ShouldStop (Event *event_ptr); virtual bool StopOthers (); virtual lldb::StateType RunState (); - virtual bool IsImmediate () const - { - return false; - } virtual bool WillResume (lldb::StateType resume_state, bool current_plan); virtual bool WillStop (); virtual bool MischiefManaged (); diff --git a/lldb/source/API/SBThread.cpp b/lldb/source/API/SBThread.cpp index 006efc79132..ee6b6874678 100644 --- a/lldb/source/API/SBThread.cpp +++ b/lldb/source/API/SBThread.cpp @@ -81,9 +81,9 @@ SBThread::GetStopReason() { if (m_opaque_sp) { - lldb_private::StopInfo *stop_info = m_opaque_sp->GetStopInfo (); - if (stop_info) - return stop_info->GetStopReason(); + StopInfoSP stop_info_sp = m_opaque_sp->GetStopInfo (); + if (stop_info_sp) + return stop_info_sp->GetStopReason(); } return eStopReasonInvalid; } @@ -93,10 +93,10 @@ SBThread::GetStopDescription (char *dst, size_t dst_len) { if (m_opaque_sp) { - lldb_private::StopInfo *stop_info = m_opaque_sp->GetStopInfo (); - if (stop_info) + StopInfoSP stop_info_sp = m_opaque_sp->GetStopInfo (); + if (stop_info_sp) { - const char *stop_desc = stop_info->GetDescription(); + const char *stop_desc = stop_info_sp->GetDescription(); if (stop_desc) { if (dst) @@ -110,7 +110,7 @@ SBThread::GetStopDescription (char *dst, size_t dst_len) else { size_t stop_desc_len = 0; - switch (stop_info->GetStopReason()) + switch (stop_info_sp->GetStopReason()) { case eStopReasonTrace: case eStopReasonPlanComplete: @@ -139,7 +139,7 @@ SBThread::GetStopDescription (char *dst, size_t dst_len) case eStopReasonSignal: { - stop_desc = m_opaque_sp->GetProcess().GetUnixSignals ().GetSignalAsCString (stop_info->GetValue()); + stop_desc = m_opaque_sp->GetProcess().GetUnixSignals ().GetSignalAsCString (stop_info_sp->GetValue()); if (stop_desc == NULL || stop_desc[0] == '\0') { static char signal_desc[] = "signal"; diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp index 3e0b617c631..2a5a463d8be 100644 --- a/lldb/source/Core/Debugger.cpp +++ b/lldb/source/Core/Debugger.cpp @@ -799,10 +799,10 @@ Debugger::FormatPrompt } else if (::strncmp (var_name_begin, "stop-reason}", strlen("stop-reason}")) == 0) { - lldb_private::StopInfo *stop_info = exe_ctx->thread->GetStopInfo (); - if (stop_info) + StopInfoSP stop_info_sp = exe_ctx->thread->GetStopInfo (); + if (stop_info_sp) { - cstr = stop_info->GetDescription(); + cstr = stop_info_sp->GetDescription(); if (cstr && cstr[0]) { s.PutCString(cstr); diff --git a/lldb/source/Expression/ClangFunction.cpp b/lldb/source/Expression/ClangFunction.cpp index dfb663e8e9f..b7f3d0d2362 100644 --- a/lldb/source/Expression/ClangFunction.cpp +++ b/lldb/source/Expression/ClangFunction.cpp @@ -662,10 +662,10 @@ ClangFunction::ExecuteFunction ( else ts.Printf("[ip unknown] "); - StopInfo *stop_info = thread->GetStopInfo(); - if (stop_info) + lldb::StopInfoSP stop_info_sp = thread->GetStopInfo(); + if (stop_info_sp) { - const char *stop_desc = stop_info->GetDescription(); + const char *stop_desc = stop_info_sp->GetDescription(); if (stop_desc) ts.PutCString (stop_desc); } diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index 7d481a37c33..ce072ed8cb4 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -1734,10 +1734,10 @@ Process::ProcessEventData::DoOnRemoval (Event *event_ptr) { lldb::ThreadSP thread_sp = m_process_sp->GetThreadList().GetThreadAtIndex(idx); - StopInfo *stop_info = thread_sp->GetStopInfo (); - if (stop_info) + StopInfoSP stop_info_sp = thread_sp->GetStopInfo (); + if (stop_info_sp) { - stop_info->PerformAction(event_ptr); + stop_info_sp->PerformAction(event_ptr); } } diff --git a/lldb/source/Target/Thread.cpp b/lldb/source/Target/Thread.cpp index 60eef83f71d..2df4e8f883e 100644 --- a/lldb/source/Target/Thread.cpp +++ b/lldb/source/Target/Thread.cpp @@ -44,14 +44,12 @@ Thread::Thread (Process &process, lldb::tid_t tid) : UserID (tid), ThreadInstanceSettings (*(Thread::GetSettingsController().get())), m_process (process), - m_public_stop_info_sp (), m_actual_stop_info_sp (), m_index_id (process.GetNextThreadIndexID ()), m_reg_context_sp (), m_state (eStateUnloaded), m_state_mutex (Mutex::eMutexTypeRecursive), m_plan_stack (), - m_immediate_plan_stack(), m_completed_plan_stack(), m_curr_frames_ap (), m_resume_signal (LLDB_INVALID_SIGNAL_NUMBER), @@ -99,18 +97,14 @@ Thread::SetResumeState (StateType state) m_resume_state = state; } -StopInfo * +lldb::StopInfoSP Thread::GetStopInfo () { - if (m_public_stop_info_sp.get() == NULL) - { - ThreadPlanSP plan_sp (GetCompletedPlan()); - if (plan_sp) - m_public_stop_info_sp = StopInfo::CreateStopReasonWithPlan (plan_sp); - else - m_public_stop_info_sp = GetPrivateStopReason (); - } - return m_public_stop_info_sp.get(); + ThreadPlanSP plan_sp (GetCompletedPlan()); + if (plan_sp) + return StopInfo::CreateStopReasonWithPlan (plan_sp); + else + return GetPrivateStopReason (); } bool @@ -210,7 +204,6 @@ Thread::WillResume (StateType resume_state) plan_ptr->WillResume (resume_state, false); } - m_public_stop_info_sp.reset(); m_actual_stop_info_sp.reset(); return true; } @@ -353,10 +346,7 @@ Thread::PushPlan (ThreadPlanSP &thread_plan_sp) { if (thread_plan_sp) { - if (thread_plan_sp->IsImmediate()) - m_immediate_plan_stack.push_back (thread_plan_sp); - else - m_plan_stack.push_back (thread_plan_sp); + m_plan_stack.push_back (thread_plan_sp); thread_plan_sp->DidPush(); @@ -365,10 +355,9 @@ Thread::PushPlan (ThreadPlanSP &thread_plan_sp) { StreamString s; thread_plan_sp->GetDescription (&s, lldb::eDescriptionLevelFull); - log->Printf("Pushing plan: \"%s\", tid = 0x%4.4x, immediate = %s.", + log->Printf("Pushing plan: \"%s\", tid = 0x%4.4x.", s.GetData(), - thread_plan_sp->GetThread().GetID(), - thread_plan_sp->IsImmediate() ? "true" : "false"); + thread_plan_sp->GetThread().GetID()); } } } @@ -378,17 +367,7 @@ Thread::PopPlan () { Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP); - if (!m_immediate_plan_stack.empty()) - { - ThreadPlanSP &plan = m_immediate_plan_stack.back(); - if (log) - { - log->Printf("Popping plan: \"%s\", tid = 0x%4.4x, immediate = true.", plan->GetName(), plan->GetThread().GetID()); - } - plan->WillPop(); - m_immediate_plan_stack.pop_back(); - } - else if (m_plan_stack.empty()) + if (m_plan_stack.empty()) return; else { @@ -418,9 +397,7 @@ Thread::DiscardPlan () ThreadPlan * Thread::GetCurrentPlan () { - if (!m_immediate_plan_stack.empty()) - return m_immediate_plan_stack.back().get(); - else if (m_plan_stack.empty()) + if (m_plan_stack.empty()) return NULL; else return m_plan_stack.back().get(); @@ -488,22 +465,6 @@ Thread::GetPreviousPlan (ThreadPlan *current_plan) if (stack_size > 0 && m_completed_plan_stack[0].get() == current_plan) { - if (m_immediate_plan_stack.size() > 0) - return m_immediate_plan_stack.back().get(); - else if (m_plan_stack.size() > 0) - return m_plan_stack.back().get(); - else - return NULL; - } - - stack_size = m_immediate_plan_stack.size(); - for (int i = stack_size - 1; i > 0; i--) - { - if (current_plan == m_immediate_plan_stack[i].get()) - return m_immediate_plan_stack[i-1].get(); - } - if (stack_size > 0 && m_immediate_plan_stack[0].get() == current_plan) - { if (m_plan_stack.size() > 0) return m_plan_stack.back().get(); else @@ -751,17 +712,6 @@ Thread::DumpThreadPlans (lldb_private::Stream *s) const s->EOL(); } - stack_size = m_immediate_plan_stack.size(); - s->Printf ("Immediate Plan Stack: %d elements.\n", stack_size); - for (i = stack_size - 1; i >= 0; i--) - { - s->Printf ("Element %d: ", i); - s->IndentMore(); - m_immediate_plan_stack[i]->GetDescription (s, eDescriptionLevelFull); - s->IndentLess(); - s->EOL(); - } - stack_size = m_completed_plan_stack.size(); s->Printf ("Completed Plan Stack: %d elements.\n", stack_size); for (i = stack_size - 1; i >= 0; i--) diff --git a/lldb/source/Target/ThreadList.cpp b/lldb/source/Target/ThreadList.cpp index 012774faa01..6fa9f297281 100644 --- a/lldb/source/Target/ThreadList.cpp +++ b/lldb/source/Target/ThreadList.cpp @@ -430,15 +430,7 @@ ThreadList::WillResume () for (pos = m_threads.begin(); pos != end; ++pos) { ThreadSP thread_sp(*pos); - if (thread_sp->GetCurrentPlan()->IsImmediate()) - { - // We first do all the immediate plans, so if we find one, set - // immediate_thread_sp and break out, and we'll pick it up first thing - // when we're negotiating which threads get to run. - immediate_thread_sp = thread_sp; - break; - } - else if (thread_sp->GetResumeState() != eStateSuspended && + if (thread_sp->GetResumeState() != eStateSuspended && thread_sp->GetCurrentPlan()->StopOthers()) { // You can't say "stop others" and also want yourself to be suspended. diff --git a/lldb/source/Target/ThreadPlanBase.cpp b/lldb/source/Target/ThreadPlanBase.cpp index 81fe21550f2..393a3ddeda5 100644 --- a/lldb/source/Target/ThreadPlanBase.cpp +++ b/lldb/source/Target/ThreadPlanBase.cpp @@ -67,10 +67,10 @@ ThreadPlanBase::ShouldStop (Event *event_ptr) m_stop_vote = eVoteYes; m_run_vote = eVoteYes; - StopInfo *stop_info = m_thread.GetStopInfo(); - if (stop_info) + StopInfoSP stop_info_sp = GetPrivateStopReason(); + if (stop_info_sp) { - StopReason reason = stop_info->GetStopReason(); + StopReason reason = stop_info_sp->GetStopReason(); switch (reason) { case eStopReasonInvalid: @@ -80,7 +80,7 @@ ThreadPlanBase::ShouldStop (Event *event_ptr) return false; case eStopReasonBreakpoint: - if (stop_info->ShouldStop(event_ptr)) + if (stop_info_sp->ShouldStop(event_ptr)) { // If we are going to stop for a breakpoint, then unship the other plans // at this point. Don't force the discard, however, so Master plans can stay @@ -92,7 +92,7 @@ ThreadPlanBase::ShouldStop (Event *event_ptr) // don't report this stop or the subsequent running event. // Otherwise we will post the stopped & running, but the stopped event will get marked // with "restarted" so the UI will know to wait and expect the consequent "running". - if (stop_info->ShouldNotify (event_ptr)) + if (stop_info_sp->ShouldNotify (event_ptr)) { m_stop_vote = eVoteYes; m_run_vote = eVoteYes; @@ -115,7 +115,7 @@ ThreadPlanBase::ShouldStop (Event *event_ptr) return true; case eStopReasonSignal: - if (stop_info->ShouldStop(event_ptr)) + if (stop_info_sp->ShouldStop(event_ptr)) { m_thread.DiscardThreadPlans(false); return true; @@ -124,7 +124,7 @@ ThreadPlanBase::ShouldStop (Event *event_ptr) { // We're not going to stop, but while we are here, let's figure out // whether to report this. - if (stop_info->ShouldNotify(event_ptr)) + if (stop_info_sp->ShouldNotify(event_ptr)) m_stop_vote = eVoteYes; else m_stop_vote = eVoteNo; diff --git a/lldb/source/Target/ThreadPlanStepInstruction.cpp b/lldb/source/Target/ThreadPlanStepInstruction.cpp index cef481ef0fd..a171f1ae4b1 100644 --- a/lldb/source/Target/ThreadPlanStepInstruction.cpp +++ b/lldb/source/Target/ThreadPlanStepInstruction.cpp @@ -84,10 +84,10 @@ ThreadPlanStepInstruction::ValidatePlan (Stream *error) bool ThreadPlanStepInstruction::PlanExplainsStop () { - StopInfo *stop_info = m_thread.GetStopInfo(); - if (stop_info) + StopInfoSP stop_info_sp = GetPrivateStopReason(); + if (stop_info_sp) { - StopReason reason = stop_info->GetStopReason(); + StopReason reason = stop_info_sp->GetStopReason(); if (reason == eStopReasonTrace || reason == eStopReasonNone) return true; else diff --git a/lldb/source/Target/ThreadPlanStepOut.cpp b/lldb/source/Target/ThreadPlanStepOut.cpp index 5d29134b859..b37c4a5f9a0 100644 --- a/lldb/source/Target/ThreadPlanStepOut.cpp +++ b/lldb/source/Target/ThreadPlanStepOut.cpp @@ -104,16 +104,16 @@ ThreadPlanStepOut::PlanExplainsStop () { // We don't explain signals or breakpoints (breakpoints that handle stepping in or // out will be handled by a child plan. - StopInfo *stop_info = m_thread.GetStopInfo(); - if (stop_info) + StopInfoSP stop_info_sp = GetPrivateStopReason(); + if (stop_info_sp) { - StopReason reason = stop_info->GetStopReason(); + StopReason reason = stop_info_sp->GetStopReason(); switch (reason) { case eStopReasonBreakpoint: { // If this is OUR breakpoint, we're fine, otherwise we don't know why this happened... - BreakpointSiteSP site_sp (m_thread.GetProcess().GetBreakpointSiteList().FindByID (stop_info->GetValue())); + BreakpointSiteSP site_sp (m_thread.GetProcess().GetBreakpointSiteList().FindByID (stop_info_sp->GetValue())); if (site_sp && site_sp->IsBreakpointAtThisSite (m_return_bp_id)) { // If there was only one owner, then we're done. But if we also hit some diff --git a/lldb/source/Target/ThreadPlanStepRange.cpp b/lldb/source/Target/ThreadPlanStepRange.cpp index afc9773170a..2b0c0c74d83 100644 --- a/lldb/source/Target/ThreadPlanStepRange.cpp +++ b/lldb/source/Target/ThreadPlanStepRange.cpp @@ -62,10 +62,10 @@ ThreadPlanStepRange::PlanExplainsStop () { // We don't explain signals or breakpoints (breakpoints that handle stepping in or // out will be handled by a child plan. - StopInfo *stop_info = m_thread.GetStopInfo(); - if (stop_info) + StopInfoSP stop_info_sp = GetPrivateStopReason(); + if (stop_info_sp) { - StopReason reason = stop_info->GetStopReason(); + StopReason reason = stop_info_sp->GetStopReason(); switch (reason) { diff --git a/lldb/source/Target/ThreadPlanStepUntil.cpp b/lldb/source/Target/ThreadPlanStepUntil.cpp index f528cb0aae1..94a0e77c2f0 100644 --- a/lldb/source/Target/ThreadPlanStepUntil.cpp +++ b/lldb/source/Target/ThreadPlanStepUntil.cpp @@ -170,20 +170,20 @@ ThreadPlanStepUntil::AnalyzeStop() if (m_ran_analyze) return; - StopInfo *stop_info = m_thread.GetStopInfo(); + StopInfoSP stop_info_sp = GetPrivateStopReason(); m_should_stop = true; m_explains_stop = false; - if (stop_info) + if (stop_info_sp) { - StopReason reason = stop_info->GetStopReason(); + StopReason reason = stop_info_sp->GetStopReason(); switch (reason) { case eStopReasonBreakpoint: { // If this is OUR breakpoint, we're fine, otherwise we don't know why this happened... - BreakpointSiteSP this_site = m_thread.GetProcess().GetBreakpointSiteList().FindByID (stop_info->GetValue()); + BreakpointSiteSP this_site = m_thread.GetProcess().GetBreakpointSiteList().FindByID (stop_info_sp->GetValue()); if (!this_site) { m_explains_stop = false; @@ -275,8 +275,8 @@ ThreadPlanStepUntil::ShouldStop (Event *event_ptr) // do so here. Otherwise, as long as this thread has stopped for a reason, // we will stop. - StopInfo *stop_info = m_thread.GetStopInfo (); - if (stop_info == NULL || stop_info->GetStopReason() == eStopReasonNone) + StopInfoSP stop_info_sp = GetPrivateStopReason(); + if (stop_info_sp == NULL || stop_info_sp->GetStopReason() == eStopReasonNone) return false; AnalyzeStop(); diff --git a/lldb/source/Target/ThreadPlanTestCondition.cpp b/lldb/source/Target/ThreadPlanTestCondition.cpp index 30fe739136f..d66fff7bca5 100644 --- a/lldb/source/Target/ThreadPlanTestCondition.cpp +++ b/lldb/source/Target/ThreadPlanTestCondition.cpp @@ -110,9 +110,9 @@ ThreadPlanTestCondition::ShouldStop (Event *event_ptr) 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); |