52 lines · c
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-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDSTOPHOOKPYTHONINTERFACE_H10#define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDSTOPHOOKPYTHONINTERFACE_H11 12#include "lldb/Host/Config.h"13#include "lldb/Interpreter/Interfaces/ScriptedStopHookInterface.h"14 15#if LLDB_ENABLE_PYTHON16 17#include "ScriptedPythonInterface.h"18 19namespace lldb_private {20class ScriptedStopHookPythonInterface : public ScriptedStopHookInterface,21 public ScriptedPythonInterface,22 public PluginInterface {23public:24 ScriptedStopHookPythonInterface(ScriptInterpreterPythonImpl &interpreter);25 26 llvm::Expected<StructuredData::GenericSP>27 CreatePluginObject(llvm::StringRef class_name, lldb::TargetSP target_sp,28 const StructuredDataImpl &args_sp) override;29 30 llvm::SmallVector<AbstractMethodRequirement>31 GetAbstractMethodRequirements() const override {32 return llvm::SmallVector<AbstractMethodRequirement>({{"handle_stop", 2}});33 }34 35 llvm::Expected<bool> HandleStop(ExecutionContext &exe_ctx,36 lldb::StreamSP &output_sp) override;37 38 static void Initialize();39 40 static void Terminate();41 42 static llvm::StringRef GetPluginNameStatic() {43 return "ScriptedStopHookPythonInterface";44 }45 46 llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }47};48} // namespace lldb_private49 50#endif // LLDB_ENABLE_PYTHON51#endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDSTOPHOOKPYTHONINTERFACE_H52