aboutsummaryrefslogtreecommitdiff
path: root/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
diff options
context:
space:
mode:
authorMed Ismail Bennani <ismail@bennani.ma>2023-10-25 10:05:54 -0700
committerGitHub <noreply@github.com>2023-10-25 10:05:54 -0700
commitf22d82cef28a882cec4d242910933e9f5d7dcdce (patch)
tree2a75ad93c317a3b302fd0829c72fb40530114feb /lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
parent7ce613fc77af092dd6e9db71ce3747b75bc5616e (diff)
downloadllvm-f22d82cef28a882cec4d242910933e9f5d7dcdce.zip
llvm-f22d82cef28a882cec4d242910933e9f5d7dcdce.tar.gz
llvm-f22d82cef28a882cec4d242910933e9f5d7dcdce.tar.bz2
[lldb/Interpreter] Make ScriptedInterface Object creation more generic (#68052)
This patch changes the way plugin objects used with Scripted Interfaces are created. Instead of implementing a different SWIG method to create the object for every scripted interface, this patch makes the creation more generic by re-using some of the ScriptedPythonInterface templated Dispatch code. This patch also improves error handling of the object creation by returning an `llvm::Expected`. Signed-off-by: Med Ismail Bennani <ismail@bennani.ma> 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.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp b/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
index 14fe69f..9dd845f 100644
--- a/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
+++ b/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
@@ -232,14 +232,6 @@ lldb_private::python::SWIGBridge::LLDBSWIGPythonCreateOSPlugin(
}
python::PythonObject
-lldb_private::python::SWIGBridge::LLDBSwigPythonCreateScriptedObject(
- const char *python_class_name, const char *session_dictionary_name,
- lldb::ExecutionContextRefSP exe_ctx_sp, const StructuredDataImpl &args_impl,
- std::string &error_string) {
- return python::PythonObject();
-}
-
-python::PythonObject
lldb_private::python::SWIGBridge::LLDBSWIGPython_CreateFrameRecognizer(
const char *python_class_name, const char *session_dictionary_name) {
return python::PythonObject();
@@ -321,3 +313,13 @@ python::PythonObject
lldb_private::python::SWIGBridge::ToSWIGWrapper(lldb::DataExtractorSP) {
return python::PythonObject();
}
+
+python::PythonObject
+lldb_private::python::SWIGBridge::ToSWIGWrapper(lldb::ExecutionContextRefSP) {
+ return python::PythonObject();
+}
+
+python::PythonObject
+lldb_private::python::SWIGBridge::ToSWIGWrapper(const StructuredDataImpl &) {
+ return python::PythonObject();
+}