]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanStepThrough.h
MFV r342532: 5882 Temporary pool names
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / Target / ThreadPlanStepThrough.h
1 //===-- ThreadPlanStepThrough.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_ThreadPlanStepThrough_h_
11 #define liblldb_ThreadPlanStepThrough_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
20 namespace lldb_private {
21
22 class ThreadPlanStepThrough : public ThreadPlan {
23 public:
24   ~ThreadPlanStepThrough() 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   void DidPush() override;
34
35 protected:
36   bool DoPlanExplainsStop(Event *event_ptr) override;
37   bool DoWillResume(lldb::StateType resume_state, bool current_plan) override;
38
39   ThreadPlanStepThrough(Thread &thread, StackID &return_stack_id,
40                         bool stop_others);
41
42   void LookForPlanToStepThroughFromCurrentPC();
43
44   bool HitOurBackstopBreakpoint();
45
46 private:
47   friend lldb::ThreadPlanSP
48
49   Thread::QueueThreadPlanForStepThrough(StackID &return_stack_id,
50                                         bool abort_other_plans,
51                                         bool stop_others);
52
53   void ClearBackstopBreakpoint();
54
55   lldb::ThreadPlanSP m_sub_plan_sp;
56   lldb::addr_t m_start_address;
57   lldb::break_id_t m_backstop_bkpt_id;
58   lldb::addr_t m_backstop_addr;
59   StackID m_return_stack_id;
60   bool m_stop_others;
61
62   DISALLOW_COPY_AND_ASSIGN(ThreadPlanStepThrough);
63 };
64
65 } // namespace lldb_private
66
67 #endif // liblldb_ThreadPlanStepThrough_h_