aboutsummaryrefslogtreecommitdiff
path: root/lldb/unittests/ScriptInterpreter/Python
diff options
context:
space:
mode:
authorMed Ismail Bennani <medismail.bennani@gmail.com>2022-11-18 13:53:57 -0800
committerMed Ismail Bennani <medismail.bennani@gmail.com>2022-11-18 13:56:48 -0800
commit7e01924e4e5634a6fa7d500574aeca58c8f36873 (patch)
tree564584938cc29e0de71ad0b4682da79f5617ffba /lldb/unittests/ScriptInterpreter/Python
parent288843a161f71148d7028e5153038006dd87e363 (diff)
downloadllvm-7e01924e4e5634a6fa7d500574aeca58c8f36873.zip
llvm-7e01924e4e5634a6fa7d500574aeca58c8f36873.tar.gz
llvm-7e01924e4e5634a6fa7d500574aeca58c8f36873.tar.bz2
[lldb/Plugins] Improve error reporting with reading memory in Scripted Process
This patch improves the ScriptedPythonInterface::Dispatch method to support passing lldb_private types to the python implementation. This will allow, for instance, the Scripted Process python implementation to report errors when reading memory back to lldb. To do so, the Dispatch method will transform the private types in the parameter pack into `PythonObject`s to be able to pass them down to the python methods. Then, if the call succeeded, the transformed arguments will be converted back to their original type and re-assigned in the parameter pack, to ensure pointers and references behaviours are preserved. This patch also updates various scripted process python class and tests to reflect this change. rdar://100030995 Differential Revision: https://reviews.llvm.org/D134033 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
Diffstat (limited to 'lldb/unittests/ScriptInterpreter/Python')
-rw-r--r--lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp b/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
index 87e4a03..51ff7e4 100644
--- a/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
+++ b/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
@@ -270,3 +270,7 @@ bool lldb_private::LLDBSwigPythonStopHookCallHandleStop(
lldb::StreamSP stream) {
return false;
}
+
+python::PythonObject lldb_private::python::ToSWIGWrapper(const Status &status) {
+ return python::PythonObject();
+}