LLDB  mainline
ThreadPlanPython.h
Go to the documentation of this file.
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"
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 
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_
Enumerations for broadcasting.
Definition: SBLaunchInfo.h:14
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
bool ShouldStop(Event *event_ptr) override
ThreadPlanPython(Thread &thread, const char *class_name)
bool ValidatePlan(Stream *error) override
Returns whether this plan could be successfully created.
bool DoPlanExplainsStop(Event *event_ptr) override
std::shared_ptr< Object > ObjectSP
void GetDescription(Stream *s, lldb::DescriptionLevel level) override
Print a description of this thread to the stream s.
lldb::StateType GetPlanRunState() override