LLDB
mainline
llvm-project
lldb
source
Plugins
ScriptInterpreter
Python
Interfaces
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
13
#include "
lldb/Interpreter/Interfaces/ScriptedBreakpointInterface.h
"
14
15
#include "
ScriptedPythonInterface.h
"
16
17
namespace
lldb_private
{
18
class
ScriptedBreakpointPythonInterface
:
public
ScriptedBreakpointInterface
,
19
public
ScriptedPythonInterface
,
20
public
PluginInterface
{
21
public
:
22
ScriptedBreakpointPythonInterface
(
ScriptInterpreterPythonImpl
&interpreter);
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>
29
GetAbstractMethodRequirements
()
const override
{
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
;
36
lldb::BreakpointLocationSP
37
WasHit
(
lldb::StackFrameSP
frame_sp,
38
lldb::BreakpointLocationSP
bp_loc_sp)
override
;
39
virtual
std::optional<std::string>
40
GetLocationDescription
(
lldb::BreakpointLocationSP
bp_loc_sp,
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
ScriptedBreakpointInterface.h
ScriptedPythonInterface.h
lldb_private::PluginInterface::PluginInterface
PluginInterface()=default
lldb_private::ScriptInterpreterPythonImpl
Definition
ScriptInterpreterPythonImpl.h:25
lldb_private::ScriptedBreakpointInterface
Definition
ScriptedBreakpointInterface.h:17
lldb_private::ScriptedBreakpointPythonInterface::GetShortHelp
std::optional< std::string > GetShortHelp() override
Definition
ScriptedBreakpointPythonInterface.cpp:69
lldb_private::ScriptedBreakpointPythonInterface::ScriptedBreakpointPythonInterface
ScriptedBreakpointPythonInterface(ScriptInterpreterPythonImpl &interpreter)
Definition
ScriptedBreakpointPythonInterface.cpp:26
lldb_private::ScriptedBreakpointPythonInterface::ResolverCallback
bool ResolverCallback(SymbolContext sym_ctx) override
"ResolverCallback" will get called when a new module is loaded.
Definition
ScriptedBreakpointPythonInterface.cpp:38
lldb_private::ScriptedBreakpointPythonInterface::WasHit
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".
Definition
ScriptedBreakpointPythonInterface.cpp:81
lldb_private::ScriptedBreakpointPythonInterface::GetDepth
lldb::SearchDepth GetDepth() override
Definition
ScriptedBreakpointPythonInterface.cpp:53
lldb_private::ScriptedBreakpointPythonInterface::Initialize
static void Initialize()
Definition
ScriptedBreakpointPythonInterface.cpp:107
lldb_private::ScriptedBreakpointPythonInterface::Terminate
static void Terminate()
Definition
ScriptedBreakpointPythonInterface.cpp:119
lldb_private::ScriptedBreakpointPythonInterface::GetAbstractMethodRequirements
llvm::SmallVector< AbstractMethodRequirement > GetAbstractMethodRequirements() const override
Definition
ScriptedBreakpointPythonInterface.h:29
lldb_private::ScriptedBreakpointPythonInterface::CreatePluginObject
llvm::Expected< StructuredData::GenericSP > CreatePluginObject(llvm::StringRef class_name, lldb::BreakpointSP break_sp, const StructuredDataImpl &args_sp) override
Definition
ScriptedBreakpointPythonInterface.cpp:31
lldb_private::ScriptedBreakpointPythonInterface::GetPluginNameStatic
static llvm::StringRef GetPluginNameStatic()
Definition
ScriptedBreakpointPythonInterface.h:47
lldb_private::ScriptedBreakpointPythonInterface::GetPluginName
llvm::StringRef GetPluginName() override
Definition
ScriptedBreakpointPythonInterface.h:51
lldb_private::ScriptedBreakpointPythonInterface::GetLocationDescription
virtual std::optional< std::string > GetLocationDescription(lldb::BreakpointLocationSP bp_loc_sp, lldb::DescriptionLevel level) override
Definition
ScriptedBreakpointPythonInterface.cpp:94
lldb_private::ScriptedPythonInterface::ScriptedPythonInterface
ScriptedPythonInterface(ScriptInterpreterPythonImpl &interpreter)
Definition
ScriptedPythonInterface.cpp:25
lldb_private::StructuredDataImpl
Definition
StructuredDataImpl.h:26
lldb_private::SymbolContext
Defines a symbol context baton that can be handed other debug core functions.
Definition
SymbolContext.h:37
lldb_private
A class that represents a running process on the host machine.
Definition
SBAddressRange.h:14
lldb::StackFrameSP
std::shared_ptr< lldb_private::StackFrame > StackFrameSP
Definition
lldb-forward.h:440
lldb::BreakpointLocationSP
std::shared_ptr< lldb_private::BreakpointLocation > BreakpointLocationSP
Definition
lldb-forward.h:330
lldb::DescriptionLevel
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
Definition
lldb-enumerations.h:217
lldb::BreakpointSP
std::shared_ptr< lldb_private::Breakpoint > BreakpointSP
Definition
lldb-forward.h:327
lldb::SearchDepth
SearchDepth
Definition
lldb-enumerations.h:297
Generated on
for LLDB by
1.14.0