1 //===-- ScriptedProcessPythonInterface.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_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTEDPROCESSPYTHONINTERFACE_H 10 #define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTEDPROCESSPYTHONINTERFACE_H 11 12 #include "lldb/Host/Config.h" 13 14 #if LLDB_ENABLE_PYTHON 15 16 #include "ScriptedPythonInterface.h" 17 #include "lldb/Interpreter/ScriptedProcessInterface.h" 18 19 namespace lldb_private { 20 class ScriptedProcessPythonInterface : public ScriptedProcessInterface, 21 public ScriptedPythonInterface { 22 public: 23 ScriptedProcessPythonInterface(ScriptInterpreterPythonImpl &interpreter); 24 25 StructuredData::GenericSP 26 CreatePluginObject(const llvm::StringRef class_name, 27 ExecutionContext &exe_ctx, 28 StructuredData::DictionarySP args_sp) override; 29 30 Status Launch() override; 31 32 Status Resume() override; 33 34 bool ShouldStop() override; 35 36 Status Stop() override; 37 38 lldb::MemoryRegionInfoSP 39 GetMemoryRegionContainingAddress(lldb::addr_t address) override; 40 41 StructuredData::DictionarySP GetThreadWithID(lldb::tid_t tid) override; 42 43 StructuredData::DictionarySP GetRegistersForThread(lldb::tid_t tid) override; 44 45 lldb::DataExtractorSP ReadMemoryAtAddress(lldb::addr_t address, size_t size, 46 Status &error) override; 47 48 StructuredData::DictionarySP GetLoadedImages() override; 49 50 lldb::pid_t GetProcessID() override; 51 52 bool IsAlive() override; 53 }; 54 } // namespace lldb_private 55 56 #endif // LLDB_ENABLE_PYTHON 57 #endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTEDPROCESSPYTHONINTERFACE_H 58