1 //===-- ThreadPlanStepInRange.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_ThreadPlanStepInRange_h_
11 #define liblldb_ThreadPlanStepInRange_h_
15 // Other libraries and framework 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"
23 namespace lldb_private {
25 class ThreadPlanStepInRange :
26 public ThreadPlanStepRange,
27 public ThreadPlanShouldStopHere
30 ThreadPlanStepInRange (Thread &thread,
31 const AddressRange &range,
32 const SymbolContext &addr_context,
33 lldb::RunMode stop_others);
35 ThreadPlanStepInRange (Thread &thread,
36 const AddressRange &range,
37 const SymbolContext &addr_context,
38 const char *step_into_function_name,
39 lldb::RunMode stop_others);
42 ~ThreadPlanStepInRange ();
45 GetDescription (Stream *s, lldb::DescriptionLevel level);
48 ShouldStop (Event *event_ptr);
50 void SetAvoidRegexp(const char *name);
52 void SetStepInTarget (const char *target)
54 m_step_into_target.SetCString(target);
57 static lldb::ThreadPlanSP
58 DefaultShouldStopHereCallback (ThreadPlan *current_plan, Flags &flags, void *baton);
61 SetDefaultFlagValue (uint32_t new_value);
67 virtual bool DoWillResume (lldb::StateType resume_state, bool current_plan);
70 DoPlanExplainsStop (Event *event_ptr);
76 FrameMatchesAvoidRegexp ();
80 friend lldb::ThreadPlanSP
81 Thread::QueueThreadPlanForStepOverRange (bool abort_other_plans,
82 const AddressRange &range,
83 const SymbolContext &addr_context,
84 lldb::RunMode stop_others);
85 friend lldb::ThreadPlanSP
86 Thread::QueueThreadPlanForStepInRange (bool abort_other_plans,
87 const AddressRange &range,
88 const SymbolContext &addr_context,
89 const char *step_in_target,
90 lldb::RunMode stop_others,
91 bool avoid_code_without_debug_info);
94 // Need an appropriate marker for the current stack so we can tell step out
97 static uint32_t s_default_flag_values;
98 lldb::ThreadPlanSP m_sub_plan_sp; // Keep track of the last plan we were running. If it fails, we should stop.
99 std::unique_ptr<RegularExpression> m_avoid_regexp_ap;
100 bool m_step_past_prologue; // FIXME: For now hard-coded to true, we could put a switch in for this if there's
102 bool m_virtual_step; // true if we've just done a "virtual step", i.e. just moved the inline stack depth.
103 ConstString m_step_into_target;
104 DISALLOW_COPY_AND_ASSIGN (ThreadPlanStepInRange);
108 } // namespace lldb_private
110 #endif // liblldb_ThreadPlanStepInRange_h_