aboutsummaryrefslogtreecommitdiff
path: root/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
diff options
context:
space:
mode:
authorMed Ismail Bennani <ismail@bennani.ma>2023-10-30 16:52:17 -0700
committerGitHub <noreply@github.com>2023-10-30 16:52:17 -0700
commit4b3cd379cce3f455bf3c8677ca7a5be6e708a4ce (patch)
tree4d1348946d3a079d0c929de12280dd804854aad7 /lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
parentc2f642d90d33a4e6c987b52e22eca4221c86c601 (diff)
downloadllvm-4b3cd379cce3f455bf3c8677ca7a5be6e708a4ce.zip
llvm-4b3cd379cce3f455bf3c8677ca7a5be6e708a4ce.tar.gz
llvm-4b3cd379cce3f455bf3c8677ca7a5be6e708a4ce.tar.bz2
[lldb] Make use of Scripted{Python,}Interface for ScriptedThreadPlan (#70392)
This patch makes ScriptedThreadPlan conforming to the ScriptedInterface & ScriptedPythonInterface facilities by introducing 2 ScriptedThreadPlanInterface & ScriptedThreadPlanPythonInterface classes. This allows us to get rid of every ScriptedThreadPlan-specific SWIG method and re-use the same affordances as other scripting offordances, like Scripted{Process,Thread,Platform} & OperatingSystem. To do so, this adds new transformer methods for `ThreadPlan`, `Stream` & `Event`, to allow the bijection between C++ objects and their python counterparts. Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
Diffstat (limited to 'lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp')
-rw-r--r--lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp45
1 files changed, 25 insertions, 20 deletions
diff --git a/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp b/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
index 7f3359f..72dcf45 100644
--- a/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
+++ b/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
@@ -96,26 +96,6 @@ lldb_private::python::SWIGBridge::LLDBSwigPythonCreateCommandObject(
return python::PythonObject();
}
-python::PythonObject
-lldb_private::python::SWIGBridge::LLDBSwigPythonCreateScriptedThreadPlan(
- const char *python_class_name, const char *session_dictionary_name,
- const StructuredDataImpl &args_data, std::string &error_string,
- const lldb::ThreadPlanSP &thread_plan_sp) {
- return python::PythonObject();
-}
-
-bool lldb_private::python::SWIGBridge::LLDBSWIGPythonCallThreadPlan(
- void *implementor, const char *method_name, Event *event_sp,
- bool &got_error) {
- return false;
-}
-
-bool lldb_private::python::SWIGBridge::LLDBSWIGPythonCallThreadPlan(
- void *implementor, const char *method_name, Stream *event_sp,
- bool &got_error) {
- return false;
-}
-
python::PythonObject lldb_private::python::SWIGBridge::
LLDBSwigPythonCreateScriptedBreakpointResolver(
const char *python_class_name, const char *session_dictionary_name,
@@ -171,6 +151,16 @@ lldb_private::python::LLDBSWIGPython_CastPyObjectToSBError(PyObject *data) {
}
void *
+lldb_private::python::LLDBSWIGPython_CastPyObjectToSBEvent(PyObject *data) {
+ return nullptr;
+}
+
+void *
+lldb_private::python::LLDBSWIGPython_CastPyObjectToSBStream(PyObject *data) {
+ return nullptr;
+}
+
+void *
lldb_private::python::LLDBSWIGPython_CastPyObjectToSBValue(PyObject *data) {
return nullptr;
}
@@ -320,6 +310,11 @@ lldb_private::python::SWIGBridge::ToSWIGWrapper(lldb::ExecutionContextRefSP) {
}
python::PythonObject
+lldb_private::python::SWIGBridge::ToSWIGWrapper(lldb::ThreadPlanSP) {
+ return python::PythonObject();
+}
+
+python::PythonObject
lldb_private::python::SWIGBridge::ToSWIGWrapper(lldb::ProcessSP) {
return python::PythonObject();
}
@@ -328,3 +323,13 @@ python::PythonObject lldb_private::python::SWIGBridge::ToSWIGWrapper(
const lldb_private::StructuredDataImpl &) {
return python::PythonObject();
}
+
+python::PythonObject
+lldb_private::python::SWIGBridge::ToSWIGWrapper(Event *event) {
+ return python::PythonObject();
+}
+
+python::PythonObject
+lldb_private::python::SWIGBridge::ToSWIGWrapper(const Stream *stream) {
+ return python::PythonObject();
+}