Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedStopHookPythonInterface.h
213893 views
1
//===-- ScriptedStopHookPythonInterface.h -----------------------*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
9
#ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDSTOPHOOKPYTHONINTERFACE_H
10
#define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDSTOPHOOKPYTHONINTERFACE_H
11
12
#include "lldb/Host/Config.h"
13
#include "lldb/Interpreter/Interfaces/ScriptedStopHookInterface.h"
14
15
#if LLDB_ENABLE_PYTHON
16
17
#include "ScriptedPythonInterface.h"
18
19
namespace lldb_private {
20
class ScriptedStopHookPythonInterface : public ScriptedStopHookInterface,
21
public ScriptedPythonInterface,
22
public PluginInterface {
23
public:
24
ScriptedStopHookPythonInterface(ScriptInterpreterPythonImpl &interpreter);
25
26
llvm::Expected<StructuredData::GenericSP>
27
CreatePluginObject(llvm::StringRef class_name, lldb::TargetSP target_sp,
28
const StructuredDataImpl &args_sp) override;
29
30
llvm::SmallVector<AbstractMethodRequirement>
31
GetAbstractMethodRequirements() const override {
32
return llvm::SmallVector<AbstractMethodRequirement>({{"handle_stop", 2}});
33
}
34
35
llvm::Expected<bool> HandleStop(ExecutionContext &exe_ctx,
36
lldb::StreamSP &output_sp) override;
37
38
static void Initialize();
39
40
static void Terminate();
41
42
static llvm::StringRef GetPluginNameStatic() {
43
return "ScriptedStopHookPythonInterface";
44
}
45
46
llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
47
};
48
} // namespace lldb_private
49
50
#endif // LLDB_ENABLE_PYTHON
51
#endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDSTOPHOOKPYTHONINTERFACE_H
52
53