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 #include <string> 15 16 #include "lldb/Target/Process.h" 17 #include "lldb/Target/StopInfo.h" 18 #include "lldb/Target/Target.h" 19 #include "lldb/Target/Thread.h" 20 #include "lldb/Target/ThreadPlan.h" 21 #include "lldb/Target/ThreadPlanTracer.h" 22 #include "lldb/Utility/StructuredData.h" 23 #include "lldb/Utility/UserID.h" 24 #include "lldb/lldb-private.h" 25 26 namespace lldb_private { 27 28 //------------------------------------------------------------------ 29 // ThreadPlanPython: 30 // 31 //------------------------------------------------------------------ 32 33 class ThreadPlanPython : public ThreadPlan { 34 public: 35 ThreadPlanPython(Thread &thread, const char *class_name); 36 ~ThreadPlanPython() override; 37 38 void GetDescription(Stream *s, lldb::DescriptionLevel level) override; 39 40 bool ValidatePlan(Stream *error) override; 41 42 bool ShouldStop(Event *event_ptr) override; 43 44 bool MischiefManaged() override; 45 46 bool WillStop() override; 47 48 bool StopOthers() override; 49 50 void DidPush() override; 51 52 bool IsPlanStale() override; 53 54 protected: 55 bool DoPlanExplainsStop(Event *event_ptr) override; 56 57 lldb::StateType GetPlanRunState() override; 58 59 private: 60 std::string m_class_name; 61 StructuredData::ObjectSP m_implementation_sp; 62 bool m_did_push; 63 64 DISALLOW_COPY_AND_ASSIGN(ThreadPlanPython); 65 }; 66 67 } // namespace lldb_private 68 69 #endif // liblldb_ThreadPlan_Python_h_ 70