ThreadPlanStepOut.h revision 441e3b9e8bed8c67afd5e520966d7ca16579eac4
1//===-- ThreadPlanStepOut.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_ThreadPlanStepOut_h_ 11#define liblldb_ThreadPlanStepOut_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 22class ThreadPlanStepOut : public ThreadPlan 23{ 24public: 25 ThreadPlanStepOut (Thread &thread, 26 SymbolContext *addr_context, 27 bool first_insn, 28 bool stop_others, 29 Vote stop_vote, 30 Vote run_vote, 31 uint32_t frame_idx); 32 33 virtual ~ThreadPlanStepOut (); 34 35 virtual void GetDescription (Stream *s, lldb::DescriptionLevel level); 36 virtual bool ValidatePlan (Stream *error); 37 virtual bool PlanExplainsStop (); 38 virtual bool ShouldStop (Event *event_ptr); 39 virtual bool StopOthers (); 40 virtual lldb::StateType GetPlanRunState (); 41 virtual bool WillResume (lldb::StateType resume_state, bool current_plan); 42 virtual bool WillStop (); 43 virtual bool MischiefManaged (); 44 virtual void DidPush(); 45 46 virtual lldb::ValueObjectSP GetReturnValueObject() 47 { 48 return m_return_valobj_sp; 49 } 50 51protected: 52 bool QueueInlinedStepPlan (bool queue_now); 53 54private: 55 SymbolContext *m_step_from_context; 56 lldb::addr_t m_step_from_insn; 57 StackID m_step_out_to_id; 58 StackID m_immediate_step_from_id; 59 lldb::break_id_t m_return_bp_id; 60 lldb::addr_t m_return_addr; 61 bool m_first_insn; 62 bool m_stop_others; 63 lldb::ThreadPlanSP m_step_through_inline_plan_sp; 64 lldb::ThreadPlanSP m_step_out_plan_sp; 65 Function *m_immediate_step_from_function; 66 lldb::ValueObjectSP m_return_valobj_sp; 67 68 friend ThreadPlan * 69 Thread::QueueThreadPlanForStepOut (bool abort_other_plans, 70 SymbolContext *addr_context, 71 bool first_insn, 72 bool stop_others, 73 Vote stop_vote, 74 Vote run_vote, 75 uint32_t frame_idx); 76 77 // Need an appropriate marker for the current stack so we can tell step out 78 // from step in. 79 80 void 81 CalculateReturnValue(); 82 83 DISALLOW_COPY_AND_ASSIGN (ThreadPlanStepOut); 84 85}; 86 87} // namespace lldb_private 88 89#endif // liblldb_ThreadPlanStepOut_h_ 90