ThreadPlanStepInRange.h revision 24943d2ee8bfaa7cf5893e4709143924157a5c1e
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
23namespace lldb_private {
24
25class ThreadPlanStepInRange :
26    public ThreadPlanStepRange,
27    public ThreadPlanShouldStopHere
28{
29public:
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    static ThreadPlan *
40    DefaultShouldStopHereCallback (ThreadPlan *current_plan, Flags &flags, void *baton);
41
42    static void
43    SetDefaultFlagValue (uint32_t new_value);
44
45protected:
46
47    ThreadPlanStepInRange (Thread &thread,
48                           const AddressRange &range,
49                           const SymbolContext &addr_context,
50                           lldb::RunMode stop_others);
51
52    virtual void
53    SetFlagsToDefault ();
54
55private:
56
57    friend ThreadPlan *
58    Thread::QueueThreadPlanForStepRange (bool abort_other_plans,
59                                         lldb::StepType type,
60                                         const AddressRange &range,
61                                         const SymbolContext &addr_context,
62                                         lldb::RunMode stop_others);
63
64
65    // Need an appropriate marker for the current stack so we can tell step out
66    // from step in.
67
68    static uint32_t s_default_flag_values;
69
70    DISALLOW_COPY_AND_ASSIGN (ThreadPlanStepInRange);
71
72};
73
74} // namespace lldb_private
75
76#endif  // liblldb_ThreadPlanStepInRange_h_
77