summaryrefslogtreecommitdiff
path: root/lldb/bindings
diff options
context:
space:
mode:
authorMed Ismail Bennani <medismail.bennani@gmail.com>2023-03-03 19:30:56 -0800
committerMed Ismail Bennani <medismail.bennani@gmail.com>2023-03-03 19:33:02 -0800
commitf190ec6882706d30c606e62986512371925288a9 (patch)
treea8f45942a38b3bf8ab67aacff8eda3c4c4a02ad6 /lldb/bindings
parente02a355f9846d5ec9cd64b086674770ecc795c26 (diff)
downloadllvm-f190ec6882706d30c606e62986512371925288a9.tar.gz
[lldb/Plugins] Add memory writing capabilities to Scripted Process
This patch adds memory writing capabilities to the Scripted Process plugin. This allows to user to get a target address and a memory buffer on the python scripted process implementation that the user can make processing on before performing the actual write. This will also be used to write trap instruction to a real process memory to set a breakpoint. Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
Diffstat (limited to 'lldb/bindings')
-rw-r--r--lldb/bindings/python/python-swigsafecast.swig5
1 files changed, 5 insertions, 0 deletions
diff --git a/lldb/bindings/python/python-swigsafecast.swig b/lldb/bindings/python/python-swigsafecast.swig
index ae562c26518c..f7e78bb419bd 100644
--- a/lldb/bindings/python/python-swigsafecast.swig
+++ b/lldb/bindings/python/python-swigsafecast.swig
@@ -103,6 +103,11 @@ PythonObject ToSWIGWrapper(lldb::ProcessLaunchInfoSP launch_info_sp) {
SWIGTYPE_p_lldb__SBAttachInfo);
}
+PythonObject ToSWIGWrapper(lldb::DataExtractorSP data_sp) {
+ return ToSWIGHelper(new lldb::DataExtractorSP(std::move(data_sp)),
+ SWIGTYPE_p_lldb__SBData);
+}
+
ScopedPythonObject<lldb::SBCommandReturnObject>
ToSWIGWrapper(CommandReturnObject &cmd_retobj) {
return ScopedPythonObject<lldb::SBCommandReturnObject>(