ThreadPlanBase.h revision ac95966f900e8af29c25b3bd85b3d41cd4568857
1//===-- ThreadPlanBase.h ----------------------------------------*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9 10#ifndef liblldb_ThreadPlanFundamental_h_ 11#define liblldb_ThreadPlanFundamental_h_ 12 13// C Includes 14// C++ Includes 15// Other libraries and framework includes 16// Project includes 17#include "lldb/Target/Thread.h" 18#include "lldb/Target/ThreadPlan.h" 19 20namespace lldb_private { 21 22 23//------------------------------------------------------------------ 24// Base thread plans: 25// This is the generic version of the bottom most plan on the plan stack. It should 26// be able to handle generic breakpoint hitting, and signals and exceptions. 27//------------------------------------------------------------------ 28 29class ThreadPlanBase : public ThreadPlan 30{ 31public: 32 virtual ~ThreadPlanBase (); 33 34 virtual void GetDescription (Stream *s, lldb::DescriptionLevel level); 35 virtual bool ValidatePlan (Stream *error); 36 virtual bool PlanExplainsStop (); 37 virtual bool ShouldStop (Event *event_ptr); 38 virtual bool StopOthers (); 39 virtual lldb::StateType GetPlanRunState (); 40 virtual bool WillStop (); 41 virtual bool MischiefManaged (); 42 virtual bool WillResume (lldb::StateType resume_state, bool current_plan); 43 44 virtual bool IsMasterPlan() 45 { 46 return true; 47 } 48 49 virtual bool OkayToDiscard() 50 { 51 return false; 52 } 53 54protected: 55 ThreadPlanBase (Thread &thread); 56 57private: 58 friend ThreadPlan * 59 Thread::QueueFundamentalPlan(bool abort_other_plans); 60 61 DISALLOW_COPY_AND_ASSIGN (ThreadPlanBase); 62}; 63 64 65} // namespace lldb_private 66 67#endif // liblldb_ThreadPlanFundamental_h_ 68