LLDB
mainline
llvm-project
lldb
source
Plugins
ScriptInterpreter
Python
Interfaces
ScriptedStopHookPythonInterface.h
Go to the documentation of this file.
1
//===-- ScriptedStopHookPythonInterface.h -----------------------*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
9
#ifndef LLDB_SOURCE_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDSTOPHOOKPYTHONINTERFACE_H
10
#define LLDB_SOURCE_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDSTOPHOOKPYTHONINTERFACE_H
11
12
#include "
lldb/Interpreter/Interfaces/ScriptedStopHookInterface.h
"
13
14
#include "
ScriptedPythonInterface.h
"
15
16
namespace
lldb_private
{
17
class
ScriptedStopHookPythonInterface
:
public
ScriptedStopHookInterface
,
18
public
ScriptedPythonInterface
,
19
public
PluginInterface
{
20
public
:
21
ScriptedStopHookPythonInterface
(
ScriptInterpreterPythonImpl
&interpreter);
22
23
llvm::Expected<StructuredData::GenericSP>
24
CreatePluginObject
(llvm::StringRef class_name,
lldb::TargetSP
target_sp,
25
const
StructuredDataImpl
&args_sp)
override
;
26
27
llvm::SmallVector<AbstractMethodRequirement>
28
GetAbstractMethodRequirements
()
const override
{
29
return
llvm::SmallVector<AbstractMethodRequirement>({{
"handle_stop"
, 2}});
30
}
31
32
llvm::Expected<bool>
HandleStop
(
ExecutionContext
&exe_ctx,
33
lldb::StreamSP
&output_sp)
override
;
34
35
static
void
Initialize
();
36
37
static
void
Terminate
();
38
39
static
llvm::StringRef
GetPluginNameStatic
() {
40
return
"ScriptedStopHookPythonInterface"
;
41
}
42
43
llvm::StringRef
GetPluginName
()
override
{
return
GetPluginNameStatic
(); }
44
};
45
}
// namespace lldb_private
46
47
#endif
// LLDB_SOURCE_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDSTOPHOOKPYTHONINTERFACE_H
ScriptedPythonInterface.h
ScriptedStopHookInterface.h
lldb_private::ExecutionContext
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
Definition
ExecutionContext.h:317
lldb_private::PluginInterface::PluginInterface
PluginInterface()=default
lldb_private::ScriptInterpreterPythonImpl
Definition
ScriptInterpreterPythonImpl.h:25
lldb_private::ScriptedPythonInterface::ScriptedPythonInterface
ScriptedPythonInterface(ScriptInterpreterPythonImpl &interpreter)
Definition
ScriptedPythonInterface.cpp:25
lldb_private::ScriptedStopHookInterface
Definition
ScriptedStopHookInterface.h:17
lldb_private::ScriptedStopHookPythonInterface::GetPluginNameStatic
static llvm::StringRef GetPluginNameStatic()
Definition
ScriptedStopHookPythonInterface.h:39
lldb_private::ScriptedStopHookPythonInterface::GetAbstractMethodRequirements
llvm::SmallVector< AbstractMethodRequirement > GetAbstractMethodRequirements() const override
Definition
ScriptedStopHookPythonInterface.h:28
lldb_private::ScriptedStopHookPythonInterface::Initialize
static void Initialize()
Definition
ScriptedStopHookPythonInterface.cpp:58
lldb_private::ScriptedStopHookPythonInterface::GetPluginName
llvm::StringRef GetPluginName() override
Definition
ScriptedStopHookPythonInterface.h:43
lldb_private::ScriptedStopHookPythonInterface::ScriptedStopHookPythonInterface
ScriptedStopHookPythonInterface(ScriptInterpreterPythonImpl &interpreter)
Definition
ScriptedStopHookPythonInterface.cpp:27
lldb_private::ScriptedStopHookPythonInterface::CreatePluginObject
llvm::Expected< StructuredData::GenericSP > CreatePluginObject(llvm::StringRef class_name, lldb::TargetSP target_sp, const StructuredDataImpl &args_sp) override
Definition
ScriptedStopHookPythonInterface.cpp:32
lldb_private::ScriptedStopHookPythonInterface::HandleStop
llvm::Expected< bool > HandleStop(ExecutionContext &exe_ctx, lldb::StreamSP &output_sp) override
"handle_stop" will return a bool with the meaning "should_stop"... If nothing is returned,...
Definition
ScriptedStopHookPythonInterface.cpp:40
lldb_private::ScriptedStopHookPythonInterface::Terminate
static void Terminate()
Definition
ScriptedStopHookPythonInterface.cpp:68
lldb_private::StructuredDataImpl
Definition
StructuredDataImpl.h:26
lldb_private
A class that represents a running process on the host machine.
Definition
SBAddressRange.h:14
lldb::StreamSP
std::shared_ptr< lldb_private::Stream > StreamSP
Definition
lldb-forward.h:449
lldb::TargetSP
std::shared_ptr< lldb_private::Target > TargetSP
Definition
lldb-forward.h:467
Generated on
for LLDB by
1.14.0