1 //===-- ThreadPlanStepInRange.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_ThreadPlanStepInRange_h_ 11 #define liblldb_ThreadPlanStepInRange_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/ThreadPlanStepRange.h" 21 #include "lldb/Target/ThreadPlanShouldStopHere.h" 22 23 namespace lldb_private { 24 25 class ThreadPlanStepInRange : 26 public ThreadPlanStepRange, 27 public ThreadPlanShouldStopHere 28 { 29 public: 30 virtual 31 ~ThreadPlanStepInRange (); 32 33 virtual void 34 GetDescription (Stream *s, lldb::DescriptionLevel level); 35 36 virtual bool 37 ShouldStop (Event *event_ptr); 38 39 void SetAvoidRegexp(const char *name); 40 41 static ThreadPlan * 42 DefaultShouldStopHereCallback (ThreadPlan *current_plan, Flags &flags, void *baton); 43 44 static void 45 SetDefaultFlagValue (uint32_t new_value); 46 47 protected: 48 49 ThreadPlanStepInRange (Thread &thread, 50 const AddressRange &range, 51 const SymbolContext &addr_context, 52 lldb::RunMode stop_others); 53 54 virtual void 55 SetFlagsToDefault (); 56 57 bool 58 FrameMatchesAvoidRegexp (); 59 60 private: 61 62 friend ThreadPlan * 63 Thread::QueueThreadPlanForStepRange (bool abort_other_plans, 64 StepType type, 65 const AddressRange &range, 66 const SymbolContext &addr_context, 67 lldb::RunMode stop_others, 68 bool avoid_code_without_debug_info); 69 70 71 // Need an appropriate marker for the current stack so we can tell step out 72 // from step in. 73 74 static uint32_t s_default_flag_values; 75 std::auto_ptr<RegularExpression> m_avoid_regexp_ap; 76 bool m_step_past_prologue; // FIXME: For now hard-coded to true, we could put a switch in for this if there's 77 // demand for that. 78 79 DISALLOW_COPY_AND_ASSIGN (ThreadPlanStepInRange); 80 81 }; 82 83 } // namespace lldb_private 84 85 #endif // liblldb_ThreadPlanStepInRange_h_ 86