]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanPython.h
Import DTS from Linux 4.20
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / Target / ThreadPlanPython.h
1 //===-- ThreadPlanPython.h --------------------------------------------*- C++
2 //-*-===//
3 //
4 //                     The LLVM Compiler Infrastructure
5 //
6 // This file is distributed under the University of Illinois Open Source
7 // License. See LICENSE.TXT for details.
8 //
9 //===----------------------------------------------------------------------===//
10
11 #ifndef liblldb_ThreadPlan_Python_h_
12 #define liblldb_ThreadPlan_Python_h_
13
14 // C Includes
15 // C++ Includes
16 #include <string>
17
18 // Other libraries and framework includes
19 // Project includes
20 #include "lldb/Target/Process.h"
21 #include "lldb/Target/StopInfo.h"
22 #include "lldb/Target/Target.h"
23 #include "lldb/Target/Thread.h"
24 #include "lldb/Target/ThreadPlan.h"
25 #include "lldb/Target/ThreadPlanTracer.h"
26 #include "lldb/Utility/StructuredData.h"
27 #include "lldb/Utility/UserID.h"
28 #include "lldb/lldb-private.h"
29
30 namespace lldb_private {
31
32 //------------------------------------------------------------------
33 //  ThreadPlanPython:
34 //
35 //------------------------------------------------------------------
36
37 class ThreadPlanPython : public ThreadPlan {
38 public:
39   ThreadPlanPython(Thread &thread, const char *class_name);
40   ~ThreadPlanPython() override;
41
42   void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
43
44   bool ValidatePlan(Stream *error) override;
45
46   bool ShouldStop(Event *event_ptr) override;
47
48   bool MischiefManaged() override;
49
50   bool WillStop() override;
51
52   bool StopOthers() override;
53
54   void DidPush() override;
55
56   bool IsPlanStale() override;
57
58 protected:
59   bool DoPlanExplainsStop(Event *event_ptr) override;
60
61   lldb::StateType GetPlanRunState() override;
62
63 private:
64   std::string m_class_name;
65   StructuredData::ObjectSP m_implementation_sp;
66
67   DISALLOW_COPY_AND_ASSIGN(ThreadPlanPython);
68 };
69
70 } // namespace lldb_private
71
72 #endif // liblldb_ThreadPlan_Python_h_