summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPlatformPythonInterface.h
diff options
context:
space:
mode:
authorMed Ismail Bennani <medismail.bennani@gmail.com>2023-01-11 23:27:39 -0800
committerMed Ismail Bennani <medismail.bennani@gmail.com>2023-01-12 12:49:05 -0800
commitb1256f2345f6c48b08cd8691778f39e3e9053f56 (patch)
treee6ef06919b8af0a99c101c22d1082a6e55a9cc9a /lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPlatformPythonInterface.h
parentbb4ccc6688893d1bf38cfca76620d84f947b9de1 (diff)
[lldb/Interpreter] Introduce ScriptedPlatform{,Python}Interface
This patch introduces both the ScriptedPlatformInterface and the ScriptedPlatformPythonInterface. As the name suggests, these calls will be used to call into the Scripted Platform python implementation from the C++ Scripted Platform plugin instance. Differential Revision: https://reviews.llvm.org/D139251 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPlatformPythonInterface.h')
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPlatformPythonInterface.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPlatformPythonInterface.h b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPlatformPythonInterface.h
new file mode 100644
index 000000000000..1e3ad9962325
--- /dev/null
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPlatformPythonInterface.h
@@ -0,0 +1,44 @@
+//===-- ScriptedPlatformPythonInterface.h -----------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTEDPLATFORMPYTHONINTERFACE_H
+#define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTEDPLATFORMPYTHONINTERFACE_H
+
+#include "lldb/Host/Config.h"
+
+#if LLDB_ENABLE_PYTHON
+
+#include "ScriptedPythonInterface.h"
+#include "lldb/Interpreter/ScriptedPlatformInterface.h"
+
+namespace lldb_private {
+class ScriptedPlatformPythonInterface : public ScriptedPlatformInterface,
+ public ScriptedPythonInterface {
+public:
+ ScriptedPlatformPythonInterface(ScriptInterpreterPythonImpl &interpreter);
+
+ StructuredData::GenericSP
+ CreatePluginObject(const llvm::StringRef class_name,
+ ExecutionContext &exe_ctx,
+ StructuredData::DictionarySP args_sp,
+ StructuredData::Generic *script_obj = nullptr) override;
+
+ StructuredData::DictionarySP ListProcesses() override;
+
+ StructuredData::DictionarySP GetProcessInfo(lldb::pid_t) override;
+
+ Status AttachToProcess(lldb::ProcessAttachInfoSP attach_info) override;
+
+ Status LaunchProcess(lldb::ProcessLaunchInfoSP launch_info) override;
+
+ Status KillProcess(lldb::pid_t pid) override;
+};
+} // namespace lldb_private
+
+#endif // LLDB_ENABLE_PYTHON
+#endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTEDPLATFORMPYTHONINTERFACE_H