Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:42:49

0001 //===-- ScriptedPlatformInterface.h -----------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLDB_INTERPRETER_INTERFACES_SCRIPTEDPLATFORMINTERFACE_H
0010 #define LLDB_INTERPRETER_INTERFACES_SCRIPTEDPLATFORMINTERFACE_H
0011 
0012 #include "lldb/Core/StructuredDataImpl.h"
0013 #include "lldb/Interpreter/Interfaces/ScriptedInterface.h"
0014 
0015 #include "lldb/lldb-private.h"
0016 
0017 #include <string>
0018 
0019 namespace lldb_private {
0020 class ScriptedPlatformInterface : virtual public ScriptedInterface {
0021 public:
0022   virtual llvm::Expected<StructuredData::GenericSP>
0023   CreatePluginObject(llvm::StringRef class_name, ExecutionContext &exe_ctx,
0024                      StructuredData::DictionarySP args_sp,
0025                      StructuredData::Generic *script_obj = nullptr) = 0;
0026 
0027   virtual StructuredData::DictionarySP ListProcesses() { return {}; }
0028 
0029   virtual StructuredData::DictionarySP GetProcessInfo(lldb::pid_t) {
0030     return {};
0031   }
0032 
0033   virtual Status AttachToProcess(lldb::ProcessAttachInfoSP attach_info) {
0034     return Status::FromErrorString(
0035         "ScriptedPlatformInterface cannot attach to a process");
0036   }
0037 
0038   virtual Status LaunchProcess(lldb::ProcessLaunchInfoSP launch_info) {
0039     return Status::FromErrorString(
0040         "ScriptedPlatformInterface cannot launch process");
0041   }
0042 
0043   virtual Status KillProcess(lldb::pid_t pid) {
0044     return Status::FromErrorString(
0045         "ScriptedPlatformInterface cannot kill process");
0046   }
0047 };
0048 } // namespace lldb_private
0049 
0050 #endif // LLDB_INTERPRETER_INTERFACES_SCRIPTEDPLATFORMINTERFACE_H