1 //===-- ScriptedPlatformInterface.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_INTERPRETER_SCRIPTEDPLATFORMINTERFACE_H 10 #define LLDB_INTERPRETER_SCRIPTEDPLATFORMINTERFACE_H 11 12 #include "lldb/Core/StructuredDataImpl.h" 13 #include "lldb/Interpreter/ScriptedInterface.h" 14 15 #include "lldb/lldb-private.h" 16 17 #include <string> 18 19 namespace lldb_private { 20 class ScriptedPlatformInterface : virtual public ScriptedInterface { 21 public: 22 StructuredData::GenericSP 23 CreatePluginObject(llvm::StringRef class_name, ExecutionContext &exe_ctx, 24 StructuredData::DictionarySP args_sp, 25 StructuredData::Generic *script_obj = nullptr) override { 26 return {}; 27 } 28 ListProcesses()29 virtual StructuredData::DictionarySP ListProcesses() { return {}; } 30 GetProcessInfo(lldb::pid_t)31 virtual StructuredData::DictionarySP GetProcessInfo(lldb::pid_t) { 32 return {}; 33 } 34 AttachToProcess(lldb::ProcessAttachInfoSP attach_info)35 virtual Status AttachToProcess(lldb::ProcessAttachInfoSP attach_info) { 36 return Status("ScriptedPlatformInterface cannot attach to a process"); 37 } 38 LaunchProcess(lldb::ProcessLaunchInfoSP launch_info)39 virtual Status LaunchProcess(lldb::ProcessLaunchInfoSP launch_info) { 40 return Status("ScriptedPlatformInterface cannot launch process"); 41 } 42 KillProcess(lldb::pid_t pid)43 virtual Status KillProcess(lldb::pid_t pid) { 44 return Status("ScriptedPlatformInterface cannot kill process"); 45 } 46 }; 47 } // namespace lldb_private 48 49 #endif // LLDB_INTERPRETER_SCRIPTEDPLATFORMINTERFACE_H 50