1 //===-- ThreadPlanStepOut.h -------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_ThreadPlanStepOut_h_
11 #define liblldb_ThreadPlanStepOut_h_
15 // Other libraries and framework includes
17 #include "lldb/Target/Thread.h"
18 #include "lldb/Target/ThreadPlan.h"
20 namespace lldb_private {
22 class ThreadPlanStepOut : public ThreadPlan
25 ThreadPlanStepOut (Thread &thread,
26 SymbolContext *addr_context,
33 virtual ~ThreadPlanStepOut ();
35 virtual void GetDescription (Stream *s, lldb::DescriptionLevel level);
36 virtual bool ValidatePlan (Stream *error);
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 void DidPush();
43 virtual bool IsPlanStale();
45 virtual lldb::ValueObjectSP GetReturnValueObject()
47 return m_return_valobj_sp;
51 virtual bool DoPlanExplainsStop (Event *event_ptr);
52 virtual bool DoWillResume (lldb::StateType resume_state, bool current_plan);
53 bool QueueInlinedStepPlan (bool queue_now);
56 SymbolContext *m_step_from_context;
57 lldb::addr_t m_step_from_insn;
58 StackID m_step_out_to_id;
59 StackID m_immediate_step_from_id;
60 lldb::break_id_t m_return_bp_id;
61 lldb::addr_t m_return_addr;
64 lldb::ThreadPlanSP m_step_through_inline_plan_sp;
65 lldb::ThreadPlanSP m_step_out_plan_sp;
66 Function *m_immediate_step_from_function;
67 lldb::ValueObjectSP m_return_valobj_sp;
69 friend lldb::ThreadPlanSP
70 Thread::QueueThreadPlanForStepOut (bool abort_other_plans,
71 SymbolContext *addr_context,
78 // Need an appropriate marker for the current stack so we can tell step out
82 CalculateReturnValue();
84 DISALLOW_COPY_AND_ASSIGN (ThreadPlanStepOut);
88 } // namespace lldb_private
90 #endif // liblldb_ThreadPlanStepOut_h_