9#ifndef LLDB_SOURCE_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDHOOKPYTHONINTERFACE_H
10#define LLDB_SOURCE_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDHOOKPYTHONINTERFACE_H
23 llvm::Expected<StructuredData::GenericSP>
31 llvm::SmallVector<AbstractMethodRequirement>
33 return llvm::SmallVector<AbstractMethodRequirement>({{
"handle_stop", 2}});
37 return {
"handle_module_loaded",
"handle_module_unloaded"};
52 return "ScriptedHookPythonInterface";
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
PluginInterface()=default
SupportedHookMethods GetSupportedMethods() override
Check which of the three hook methods the Python class implements.
llvm::SmallVector< AbstractMethodRequirement > GetAbstractMethodRequirements() const override
handle_stop is required so a hook can always be attached via target stop-hook add -P.
llvm::StringRef GetPluginName() override
The name this interface is registered under with the PluginManager.
static llvm::StringRef GetPluginNameStatic()
llvm::SmallVector< llvm::StringLiteral > GetOptionalMethods() const override
Methods a script may legitimately leave out, for which LLDB has a documented answer.
llvm::Expected< StructuredData::GenericSP > CreatePluginObject(const ScriptedMetadata &scripted_metadata, lldb::TargetSP target_sp) override
llvm::Expected< bool > HandleStop(ExecutionContext &exe_ctx, lldb::StreamSP &output_sp) override
Called when the process stops.
ScriptedHookPythonInterface(ScriptInterpreterPythonImpl &interpreter)
llvm::Error HandleModuleUnloaded(lldb::StreamSP &output_sp) override
Called when modules are unloaded from the target. Optional.
llvm::Error HandleModuleLoaded(lldb::StreamSP &output_sp) override
Called when modules are loaded into the target.
ScriptedPythonInterface(ScriptInterpreterPythonImpl &interpreter)
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::Stream > StreamSP
std::shared_ptr< lldb_private::Target > TargetSP