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_SOURCE_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDBREAKPOINTPYTHONINTERFACE_H
11#define LLDB_SOURCE_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDBREAKPOINTPYTHONINTERFACE_H
12
14
16namespace lldb_private {
17
20 public PluginInterface {
21public:
23
24 llvm::Expected<StructuredData::GenericSP>
25 CreatePluginObject(const ScriptedMetadata &scripted_metadata,
26 lldb::BreakpointSP break_sp) override;
27
28 llvm::SmallVector<AbstractMethodRequirement>
30 return llvm::SmallVector<AbstractMethodRequirement>({{"__callback__", 2}});
31 }
32
33 bool OverridesResolver(Target &target,
34 StructuredDataImpl &resolver_data) override;
35 void SetBreakpoint(lldb::BreakpointSP break_sp) override;
36
37 bool ResolverCallback(SymbolContext sym_ctx) override;
38 lldb::SearchDepth GetDepth() override;
39 std::optional<std::string> GetShortHelp() override;
42 lldb::BreakpointLocationSP bp_loc_sp) override;
43 virtual std::optional<std::string>
45 lldb::DescriptionLevel level) override;
46
47 static void Initialize();
48
49 static void Terminate();
50
51 static llvm::StringRef GetPluginNameStatic() {
52 return "ScriptedBreakpointPythonInterface";
53 }
54
55 llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
56};
57} // namespace lldb_private
58
59#endif // LLDB_SOURCE_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDBREAKPOINTPYTHONINTERFACE_H
llvm::Expected< StructuredData::GenericSP > CreatePluginObject(const ScriptedMetadata &scripted_metadata, lldb::BreakpointSP break_sp) override
bool OverridesResolver(Target &target, StructuredDataImpl &resolver_data) override
ScriptedBreakpointPythonInterface(ScriptInterpreterPythonImpl &interpreter)
bool ResolverCallback(SymbolContext sym_ctx) override
"ResolverCallback" will get called when a new module is loaded.
lldb::BreakpointLocationSP WasHit(lldb::StackFrameSP frame_sp, lldb::BreakpointLocationSP bp_loc_sp) override
WasHit returns the breakpoint location SP for the location that was "hit".
llvm::SmallVector< AbstractMethodRequirement > GetAbstractMethodRequirements() const override
virtual std::optional< std::string > GetLocationDescription(lldb::BreakpointLocationSP bp_loc_sp, lldb::DescriptionLevel level) override
ScriptedPythonInterface(ScriptInterpreterPythonImpl &interpreter)
Defines a symbol context baton that can be handed other debug core functions.
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