Coverage Report

Created: 2022-01-18 06:27

/Users/buildslave/jenkins/workspace/coverage/llvm-project/lldb/include/lldb/Target/ThreadPlanPython.h
Line
Count
Source
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
15
#include "lldb/Core/StructuredDataImpl.h"
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-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
15
  bool StopOthers() override { return m_stop_others; }
48
49
12
  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
58
  lldb::StateType GetPlanRunState() override;
59
  
60
  ScriptInterpreter *GetScriptInterpreter();
61
62
private:
63
  std::string m_class_name;
64
  StructuredDataImpl m_args_data;
65
  std::string m_error_str;
66
  StructuredData::ObjectSP m_implementation_sp;
67
  bool m_did_push;
68
  bool m_stop_others;
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