]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm-project/lldb/include/lldb/Target/ThreadPlanPython.h
MFC r355940:
[FreeBSD/FreeBSD.git] / contrib / llvm-project / lldb / include / lldb / Target / ThreadPlanPython.h
1 //===-- ThreadPlanPython.h --------------------------------------------*- C++
2 //-*-===//
3 //
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef liblldb_ThreadPlan_Python_h_
11 #define liblldb_ThreadPlan_Python_h_
12
13 #include <string>
14
15 #include "lldb/Target/Process.h"
16 #include "lldb/Target/StopInfo.h"
17 #include "lldb/Target/Target.h"
18 #include "lldb/Target/Thread.h"
19 #include "lldb/Target/ThreadPlan.h"
20 #include "lldb/Target/ThreadPlanTracer.h"
21 #include "lldb/Utility/StructuredData.h"
22 #include "lldb/Utility/UserID.h"
23 #include "lldb/lldb-private.h"
24
25 namespace lldb_private {
26
27 //  ThreadPlanPython:
28 //
29
30 class ThreadPlanPython : public ThreadPlan {
31 public:
32   ThreadPlanPython(Thread &thread, const char *class_name);
33   ~ThreadPlanPython() override;
34
35   void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
36
37   bool ValidatePlan(Stream *error) override;
38
39   bool ShouldStop(Event *event_ptr) override;
40
41   bool MischiefManaged() override;
42
43   bool WillStop() override;
44
45   bool StopOthers() override;
46
47   void DidPush() override;
48
49   bool IsPlanStale() override;
50
51 protected:
52   bool DoPlanExplainsStop(Event *event_ptr) override;
53
54   lldb::StateType GetPlanRunState() override;
55
56 private:
57   std::string m_class_name;
58   StructuredData::ObjectSP m_implementation_sp;
59   bool m_did_push;
60
61   DISALLOW_COPY_AND_ASSIGN(ThreadPlanPython);
62 };
63
64 } // namespace lldb_private
65
66 #endif // liblldb_ThreadPlan_Python_h_