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 LLDB_TARGET_THREADPLANPYTHON_H
11 #define LLDB_TARGET_THREADPLANPYTHON_H
12 
13 #include <string>
14 
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"
23 #include "lldb/Utility/UserID.h"
24 #include "lldb/lldb-forward.h"
25 #include "lldb/lldb-private.h"
26 
27 namespace lldb_private {
28 
29 // ThreadPlanPython:
30 //
31 
32 class ThreadPlanPython : public ThreadPlan {
33 public:
34  ThreadPlanPython(Thread &thread, const char *class_name,
35  const StructuredDataImpl &args_data);
36 
37  void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
38 
39  bool ValidatePlan(Stream *error) override;
40 
41  bool ShouldStop(Event *event_ptr) override;
42 
43  bool MischiefManaged() override;
44 
45  bool WillStop() override;
46 
47  bool StopOthers() override { return m_stop_others; }
48 
49  void SetStopOthers(bool new_value) override { m_stop_others = new_value; }
50 
51  void DidPush() override;
52 
53  bool IsPlanStale() override;
54 
55 protected:
56  bool DoPlanExplainsStop(Event *event_ptr) override;
57 
59 
61 
62 private:
67  bool m_did_push;
69 
70  ThreadPlanPython(const ThreadPlanPython &) = delete;
71  const ThreadPlanPython &operator=(const ThreadPlanPython &) = delete;
72 };
73 
74 } // namespace lldb_private
75 
76 #endif // LLDB_TARGET_THREADPLANPYTHON_H
lldb_private::ThreadPlanPython::operator=
const ThreadPlanPython & operator=(const ThreadPlanPython &)=delete
lldb_private::ThreadPlanPython::GetPlanRunState
lldb::StateType GetPlanRunState() override
Definition: ThreadPlanPython.cpp:145
lldb_private::ThreadPlanPython::ShouldStop
bool ShouldStop(Event *event_ptr) override
Definition: ThreadPlanPython.cpp:73
lldb_private::Event
Definition: Event.h:182
StructuredData.h
lldb_private::ThreadPlanPython::DidPush
void DidPush() override
Definition: ThreadPlanPython.cpp:59
lldb_private::ThreadPlanPython::WillStop
bool WillStop() override
Definition: ThreadPlanPython.cpp:167
lldb_private::ThreadPlanPython::StopOthers
bool StopOthers() override
Definition: ThreadPlanPython.h:47
lldb_private::Stream
Definition: Stream.h:28
Process.h
lldb_private::ThreadPlanPython::ThreadPlanPython
ThreadPlanPython(Thread &thread, const char *class_name, const StructuredDataImpl &args_data)
Definition: ThreadPlanPython.cpp:29
lldb_private::ThreadPlanPython
Definition: ThreadPlanPython.h:32
Target.h
error
static llvm::raw_ostream & error(Stream &strm)
Definition: CommandReturnObject.cpp:17
lldb_private::ThreadPlan
Definition: ThreadPlan.h:287
lldb_private::ThreadPlanPython::MischiefManaged
bool MischiefManaged() override
Definition: ThreadPlanPython.cpp:130
lldb_private::ThreadPlanPython::ValidatePlan
bool ValidatePlan(Stream *error) override
Returns whether this plan could be successfully created.
Definition: ThreadPlanPython.cpp:40
lldb_private::ThreadPlanPython::m_error_str
std::string m_error_str
Definition: ThreadPlanPython.h:65
lldb_private::ThreadPlanPython::GetDescription
void GetDescription(Stream *s, lldb::DescriptionLevel level) override
Print a description of this thread to the stream s.
Definition: ThreadPlanPython.cpp:162
lldb_private::Thread
Definition: Thread.h:61
ThreadPlanTracer.h
lldb_private::StructuredData::ObjectSP
std::shared_ptr< Object > ObjectSP
Definition: StructuredData.h:59
lldb_private::ThreadPlanPython::m_args_data
StructuredDataImpl m_args_data
Definition: ThreadPlanPython.h:64
lldb_private::ThreadPlanPython::DoPlanExplainsStop
bool DoPlanExplainsStop(Event *event_ptr) override
Definition: ThreadPlanPython.cpp:111
lldb_private::ThreadPlanPython::m_did_push
bool m_did_push
Definition: ThreadPlanPython.h:67
lldb_private::ThreadPlanPython::GetScriptInterpreter
ScriptInterpreter * GetScriptInterpreter()
Definition: ThreadPlanPython.cpp:55
lldb_private::StructuredDataImpl
Definition: StructuredDataImpl.h:26
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
Thread.h
UserID.h
lldb-private.h
ThreadPlan.h
lldb_private::ThreadPlanPython::IsPlanStale
bool IsPlanStale() override
Definition: ThreadPlanPython.cpp:92
lldb_private::ThreadPlanPython::m_class_name
std::string m_class_name
Definition: ThreadPlanPython.h:63
StopInfo.h
lldb_private::ScriptInterpreter
Definition: ScriptInterpreter.h:126
StructuredDataImpl.h
lldb_private::ThreadPlanPython::m_implementation_sp
StructuredData::ObjectSP m_implementation_sp
Definition: ThreadPlanPython.h:66
lldb-forward.h
lldb_private::ThreadPlanPython::SetStopOthers
void SetStopOthers(bool new_value) override
Definition: ThreadPlanPython.h:49
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::ThreadPlanPython::m_stop_others
bool m_stop_others
Definition: ThreadPlanPython.h:68
lldb::StateType
StateType
Process and Thread States.
Definition: lldb-enumerations.h:73
lldb::DescriptionLevel
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
Definition: lldb-enumerations.h:207