aboutsummaryrefslogtreecommitdiff
path: root/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
diff options
context:
space:
mode:
authorMed Ismail Bennani <medismail.bennani@gmail.com>2021-03-23 16:22:18 +0000
committerMed Ismail Bennani <medismail.bennani@gmail.com>2021-03-23 18:24:47 +0100
commit1f6a57c1a0fad922e04a2b1f414b092d4b0cd8b0 (patch)
tree7be83ae7b17d0c59563fc1db05e8ff879cbbce21 /lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
parent3e0ad115439622b9c3e6ca9fd64c7fb07a679f1a (diff)
downloadllvm-1f6a57c1a0fad922e04a2b1f414b092d4b0cd8b0.zip
llvm-1f6a57c1a0fad922e04a2b1f414b092d4b0cd8b0.tar.gz
llvm-1f6a57c1a0fad922e04a2b1f414b092d4b0cd8b0.tar.bz2
[lldb/Interpreter] Add ScriptInterpreter Wrapper for ScriptedProcess
This patch adds a ScriptedProcess interface to the ScriptInterpreter and more specifically, to the ScriptInterpreterPython. This interface will be used in the C++ `ScriptProcess` Process Plugin to call the script methods. At the moment, not all methods are implemented, they will upstreamed in upcoming patches. This patch also adds helper methods to the ScriptInterpreter to convert `SBAPI` Types (SBData & SBError) to `lldb_private` types (DataExtractor & Status). rdar://65508855 Differential Revision: https://reviews.llvm.org/D95711 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
Diffstat (limited to 'lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp')
-rw-r--r--lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp b/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
index 58ddf0c..f93733b 100644
--- a/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
+++ b/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
@@ -12,6 +12,7 @@
#include "Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h"
#include "Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h"
+#include "lldb/API/SBError.h"
#include "lldb/Host/FileSystem.h"
#include "lldb/Host/HostInfo.h"
@@ -153,6 +154,14 @@ extern "C" int LLDBSwigPython_GetIndexOfChildWithName(void *implementor,
return 0;
}
+extern "C" void *LLDBSWIGPython_CastPyObjectToSBData(void *data) {
+ return nullptr;
+}
+
+extern "C" void *LLDBSWIGPython_CastPyObjectToSBError(void *data) {
+ return nullptr;
+}
+
extern "C" void *LLDBSWIGPython_CastPyObjectToSBValue(void *data) {
return nullptr;
}
@@ -207,6 +216,13 @@ LLDBSWIGPythonCreateOSPlugin(const char *python_class_name,
return nullptr;
}
+extern "C" void *LLDBSwigPythonCreateScriptedProcess(
+ const char *python_class_name, const char *session_dictionary_name,
+ const lldb::TargetSP &target_sp, StructuredDataImpl *args_impl,
+ std::string &error_string) {
+ return nullptr;
+}
+
extern "C" void *
LLDBSWIGPython_CreateFrameRecognizer(const char *python_class_name,
const char *session_dictionary_name) {