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;
40 WasHit(lldb::StackFrameSP frame_sp,
41 lldb::BreakpointLocationSP bp_loc_sp) override;
42 virtual std::optional<std::string>
43 GetLocationDescription(lldb::BreakpointLocationSP bp_loc_sp,
44 lldb::DescriptionLevel level) override;
45
46 static void Initialize();
47
48 static void Terminate();
49
50 static llvm::StringRef GetPluginNameStatic() {
51 return "ScriptedBreakpointPythonInterface";
52 }
53
54 llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
55};
56} // namespace lldb_private
57
58#endif // LLDB_ENABLE_PYTHON
59#endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDBREAKPOINTPYTHONINTERFACE_H
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::StackFrame > StackFrameSP
std::shared_ptr< lldb_private::BreakpointLocation > BreakpointLocationSP
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
std::shared_ptr< lldb_private::Breakpoint > BreakpointSP