[lldb] Add ScriptedPlatform python implementation
authorMed Ismail Bennani <medismail.bennani@gmail.com>
Thu, 12 Jan 2023 07:04:24 +0000 (23:04 -0800)
committerMed Ismail Bennani <medismail.bennani@gmail.com>
Thu, 12 Jan 2023 20:49:05 +0000 (12:49 -0800)
commitbb4ccc6688893d1bf38cfca76620d84f947b9de1
treee4ab50217235c3e27b5f09f1bbeaaaaacefe85dc
parent2d53527e9c64c70c24e1abba74fa0a8c8b3392b1
[lldb] Add ScriptedPlatform python implementation

This patch introduces both the Scripted Platform python base
implementation and an example for it.

The base implementation is embedded in lldb python module under
`lldb.plugins.scripted_platform`.

This patch also refactor the various SWIG methods to create scripted
objects into a single method, that is now shared between the Scripted
Platform, Process and Thread. It also replaces the target argument by a
execution context object.

Differential Revision: https://reviews.llvm.org/D139250

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
13 files changed:
lldb/bindings/python/CMakeLists.txt
lldb/bindings/python/python-wrapper.swig
lldb/examples/python/scripted_process/crashlog_scripted_process.py
lldb/examples/python/scripted_process/scripted_platform.py [new file with mode: 0644]
lldb/examples/python/scripted_process/scripted_process.py
lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h
lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp
lldb/source/Plugins/ScriptInterpreter/Python/ScriptedThreadPythonInterface.cpp
lldb/test/API/functionalities/scripted_platform/my_scripted_platform.py [new file with mode: 0644]
lldb/test/API/functionalities/scripted_process/dummy_scripted_process.py
lldb/test/API/functionalities/scripted_process/invalid_scripted_process.py
lldb/test/API/functionalities/scripted_process/stack_core_scripted_process.py
lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp