LLDB mainline
ScriptedBreakpointPythonInterface.h
Go to the documentation of this file.
1//===-- ScriptedBreakpointPythonInterface.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_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDBREAKPOINTPYTHONINTERFACE_H
11#define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDBREAKPOINTPYTHONINTERFACE_H
12
13#include "lldb/Host/Config.h"
15
16#if LLDB_ENABLE_PYTHON
17
19
20namespace lldb_private {
21class ScriptedBreakpointPythonInterface : public ScriptedBreakpointInterface,
22 public ScriptedPythonInterface,
23 public PluginInterface {
24public:
25 ScriptedBreakpointPythonInterface(ScriptInterpreterPythonImpl &interpreter);
26
27 llvm::Expected<StructuredData::GenericSP>
28 CreatePluginObject(llvm::StringRef class_name, lldb::BreakpointSP break_sp,
29 const StructuredDataImpl &args_sp) override;
30
31 llvm::SmallVector<AbstractMethodRequirement>
32 GetAbstractMethodRequirements() const override {
33 return llvm::SmallVector<AbstractMethodRequirement>({{"__callback__", 2}});
34 }
35
36 bool ResolverCallback(SymbolContext sym_ctx) override;
37 lldb::SearchDepth GetDepth() override;
38 std::optional<std::string> GetShortHelp() override;
39
40 static void Initialize();
41
42 static void Terminate();
43
44 static llvm::StringRef GetPluginNameStatic() {
45 return "ScriptedBreakpointPythonInterface";
46 }
47
48 llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
49};
50} // namespace lldb_private
51
52#endif // LLDB_ENABLE_PYTHON
53#endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDBREAKPOINTPYTHONINTERFACE_H
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::Breakpoint > BreakpointSP