From b01e742af7651361c2e49d22140dee9342d8d72e Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Sat, 19 Jun 2010 04:45:32 +0000 Subject: Two changes in this checkin. Added a ThreadPlanKind so that I can do some reasoning based on the kind of thread plan without having to use RTTI. Removed the ThreadPlanContinue and replaced with a ShouldAutoContinue query that serves the same purpose. Having to push another plan to assert that if there's no other indication the target should continue when this plan is popped was flakey and error prone. This method is more stable, and fixed problems we were having with thread specific breakpoints. llvm-svn: 106378 --- lldb/source/Target/ThreadPlanBase.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'lldb/source/Target/ThreadPlanBase.cpp') diff --git a/lldb/source/Target/ThreadPlanBase.cpp b/lldb/source/Target/ThreadPlanBase.cpp index 283f3bef4c9..5f5845429c0 100644 --- a/lldb/source/Target/ThreadPlanBase.cpp +++ b/lldb/source/Target/ThreadPlanBase.cpp @@ -21,8 +21,6 @@ #include "lldb/Core/Stream.h" #include "lldb/Target/Process.h" #include "lldb/Target/RegisterContext.h" -#include "lldb/Target/ThreadPlanContinue.h" -#include "lldb/Target/ThreadPlanStepOverBreakpoint.h" using namespace lldb; using namespace lldb_private; @@ -34,7 +32,7 @@ using namespace lldb_private; //---------------------------------------------------------------------- ThreadPlanBase::ThreadPlanBase (Thread &thread) : - ThreadPlan("base plan", thread, eVoteYes, eVoteNoOpinion) + ThreadPlan(ThreadPlan::eKindBase, "base plan", thread, eVoteYes, eVoteNoOpinion) { } @@ -94,13 +92,16 @@ ThreadPlanBase::ShouldStop (Event *event_ptr) { // We want to step over the breakpoint and then continue. So push these two plans. - StoppointCallbackContext hit_context(event_ptr, &m_thread.GetProcess(), &m_thread, m_thread.GetStackFrameAtIndex(0).get()); - bool should_stop = m_thread.GetProcess().GetBreakpointSiteList().ShouldStop(&hit_context, bp_site_sp->GetID()); + StoppointCallbackContext hit_context(event_ptr, &m_thread.GetProcess(), &m_thread, + m_thread.GetStackFrameAtIndex(0).get()); + bool should_stop = m_thread.GetProcess().GetBreakpointSiteList().ShouldStop(&hit_context, + bp_site_sp->GetID()); if (!should_stop) { - // If we aren't going to stop at this breakpoint, and it is internal, don't report this stop or the subsequent - // running event. Otherwise we will post the stopped & running, but the stopped event will get marked + // If we aren't going to stop at this breakpoint, and it is internal, + // 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". uint32_t i; bool is_wholly_internal = true; -- cgit v1.2.3