1 //===-- ThreadPlanStepInstruction.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_ThreadPlanStepInstruction_h_ 11 #define liblldb_ThreadPlanStepInstruction_h_ 12 13 #include "lldb/Target/Thread.h" 14 #include "lldb/Target/ThreadPlan.h" 15 #include "lldb/lldb-private.h" 16 17 namespace lldb_private { 18 19 class ThreadPlanStepInstruction : public ThreadPlan { 20 public: 21 ThreadPlanStepInstruction(Thread &thread, bool step_over, bool stop_others, 22 Vote stop_vote, Vote run_vote); 23 24 ~ThreadPlanStepInstruction() override; 25 26 void GetDescription(Stream *s, lldb::DescriptionLevel level) override; 27 bool ValidatePlan(Stream *error) override; 28 bool ShouldStop(Event *event_ptr) override; 29 bool StopOthers() override; 30 lldb::StateType GetPlanRunState() override; 31 bool WillStop() override; 32 bool MischiefManaged() override; 33 bool IsPlanStale() override; 34 35 protected: 36 bool DoPlanExplainsStop(Event *event_ptr) override; 37 38 void SetUpState(); 39 40 private: 41 friend lldb::ThreadPlanSP Thread::QueueThreadPlanForStepSingleInstruction( 42 bool step_over, bool abort_other_plans, bool stop_other_threads, 43 Status &status); 44 45 lldb::addr_t m_instruction_addr; 46 bool m_stop_other_threads; 47 bool m_step_over; 48 // These two are used only for the step over case. 49 bool m_start_has_symbol; 50 StackID m_stack_id; 51 StackID m_parent_frame_id; 52 53 DISALLOW_COPY_AND_ASSIGN(ThreadPlanStepInstruction); 54 }; 55 56 } // namespace lldb_private 57 58 #endif // liblldb_ThreadPlanStepInstruction_h_ 59