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
16
17namespace lldb_private {
20 public PluginInterface {
21public:
23
24 llvm::Expected<StructuredData::GenericSP>
25 CreatePluginObject(llvm::StringRef class_name, lldb::BreakpointSP break_sp,
26 const StructuredDataImpl &args_sp) override;
27
28 llvm::SmallVector<AbstractMethodRequirement>
30 return llvm::SmallVector<AbstractMethodRequirement>({{"__callback__", 2}});
31 }
32
33 bool ResolverCallback(SymbolContext sym_ctx) override;
34 lldb::SearchDepth GetDepth() override;
35 std::optional<std::string> GetShortHelp() override;
38 lldb::BreakpointLocationSP bp_loc_sp) override;
39 virtual std::optional<std::string>
41 lldb::DescriptionLevel level) override;
42
43 static void Initialize();
44
45 static void Terminate();
46
47 static llvm::StringRef GetPluginNameStatic() {
48 return "ScriptedBreakpointPythonInterface";
49 }
50
51 llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
52};
53} // namespace lldb_private
54
55#endif // LLDB_SOURCE_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDBREAKPOINTPYTHONINTERFACE_H
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
llvm::Expected< StructuredData::GenericSP > CreatePluginObject(llvm::StringRef class_name, lldb::BreakpointSP break_sp, const StructuredDataImpl &args_sp) 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