Path: blob/main/contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedProcessPythonInterface.h
39688 views
//===-- ScriptedProcessPythonInterface.h ------------------------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDPROCESSPYTHONINTERFACE_H9#define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDPROCESSPYTHONINTERFACE_H1011#include "lldb/Host/Config.h"1213#if LLDB_ENABLE_PYTHON1415#include "ScriptedPythonInterface.h"16#include "lldb/Interpreter/Interfaces/ScriptedProcessInterface.h"17#include <optional>1819namespace lldb_private {20class ScriptedProcessPythonInterface : public ScriptedProcessInterface,21public ScriptedPythonInterface {22public:23ScriptedProcessPythonInterface(ScriptInterpreterPythonImpl &interpreter);2425llvm::Expected<StructuredData::GenericSP>26CreatePluginObject(const llvm::StringRef class_name,27ExecutionContext &exe_ctx,28StructuredData::DictionarySP args_sp,29StructuredData::Generic *script_obj = nullptr) override;3031llvm::SmallVector<llvm::StringLiteral> GetAbstractMethods() const override {32return llvm::SmallVector<llvm::StringLiteral>(33{"read_memory_at_address", "is_alive", "get_scripted_thread_plugin"});34}3536StructuredData::DictionarySP GetCapabilities() override;3738Status Attach(const ProcessAttachInfo &attach_info) override;3940Status Launch() override;4142Status Resume() override;4344std::optional<MemoryRegionInfo>45GetMemoryRegionContainingAddress(lldb::addr_t address,46Status &error) override;4748StructuredData::DictionarySP GetThreadsInfo() override;4950bool CreateBreakpoint(lldb::addr_t addr, Status &error) override;5152lldb::DataExtractorSP ReadMemoryAtAddress(lldb::addr_t address, size_t size,53Status &error) override;5455lldb::offset_t WriteMemoryAtAddress(lldb::addr_t addr,56lldb::DataExtractorSP data_sp,57Status &error) override;5859StructuredData::ArraySP GetLoadedImages() override;6061lldb::pid_t GetProcessID() override;6263bool IsAlive() override;6465std::optional<std::string> GetScriptedThreadPluginName() override;6667StructuredData::DictionarySP GetMetadata() override;6869private:70lldb::ScriptedThreadInterfaceSP CreateScriptedThreadInterface() override;71};72} // namespace lldb_private7374#endif // LLDB_ENABLE_PYTHON75#endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDPROCESSPYTHONINTERFACE_H767778