ThreadPlanStepRange.h revision b344843f75ef893762c93fd0a22d2d45712ce74d
1//===-- ThreadPlanStepRange.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_ThreadPlanStepRange_h_ 11#define liblldb_ThreadPlanStepRange_h_ 12 13// C Includes 14// C++ Includes 15// Other libraries and framework includes 16// Project includes 17#include "lldb/Core/AddressRange.h" 18#include "lldb/Target/StackID.h" 19#include "lldb/Target/Thread.h" 20#include "lldb/Target/ThreadPlan.h" 21#include "lldb/Target/ThreadPlanShouldStopHere.h" 22 23namespace lldb_private { 24 25class ThreadPlanStepRange : public ThreadPlan 26{ 27public: 28 virtual ~ThreadPlanStepRange (); 29 30 virtual void GetDescription (Stream *s, lldb::DescriptionLevel level) = 0; 31 virtual bool ValidatePlan (Stream *error); 32 virtual bool PlanExplainsStop (); 33 virtual bool ShouldStop (Event *event_ptr) = 0; 34 virtual Vote ShouldReportStop (Event *event_ptr); 35 virtual bool StopOthers (); 36 virtual lldb::StateType GetPlanRunState (); 37 virtual bool WillStop (); 38 virtual bool MischiefManaged (); 39 40protected: 41 42 ThreadPlanStepRange (ThreadPlanKind kind, 43 const char *name, 44 Thread &thread, 45 const AddressRange &range, 46 const SymbolContext &addr_context, 47 lldb::RunMode stop_others); 48 49 bool InRange(); 50 bool FrameIsYounger(); 51 bool FrameIsOlder(); 52 bool InSymbol(); 53 54 SymbolContext m_addr_context; 55 AddressRange m_address_range; 56 lldb::RunMode m_stop_others; 57 uint32_t m_stack_depth; 58 StackID m_stack_id; // Use the stack ID so we can tell step out from step in. 59 bool m_no_more_plans; // Need this one so we can tell if we stepped into a call, but can't continue, 60 // in which case we are done. 61 bool m_first_run_event; // We want to broadcast only one running event, our first. 62 63private: 64 65 // friend ThreadPlan * 66 // Thread::QueueThreadPlanForStepRange (bool abort_other_plans, StepType type, const AddressRange &range, SymbolContext *addr_context, bool stop_others); 67 68 69 DISALLOW_COPY_AND_ASSIGN (ThreadPlanStepRange); 70 71}; 72 73} // namespace lldb_private 74 75#endif // liblldb_ThreadPlanStepRange_h_ 76