From bb4ccc6688893d1bf38cfca76620d84f947b9de1 Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Wed, 11 Jan 2023 23:04:24 -0800 Subject: [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 --- .../source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h') diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h b/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h index 35c9621..3dc2864 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h @@ -96,14 +96,10 @@ void *LLDBSWIGPython_CastPyObjectToSBMemoryRegionInfo(PyObject *data); // Although these are scripting-language specific, their definition depends on // the public API. -python::PythonObject LLDBSwigPythonCreateScriptedProcess( +python::PythonObject LLDBSwigPythonCreateScriptedObject( const char *python_class_name, const char *session_dictionary_name, - const lldb::TargetSP &target_sp, const StructuredDataImpl &args_impl, - std::string &error_string); - -python::PythonObject LLDBSwigPythonCreateScriptedThread( - const char *python_class_name, const char *session_dictionary_name, - const lldb::ProcessSP &process_sp, const StructuredDataImpl &args_impl, + lldb::ExecutionContextRefSP exe_ctx_sp, + const lldb_private::StructuredDataImpl &args_impl, std::string &error_string); llvm::Expected LLDBSwigPythonBreakpointCallbackFunction( -- cgit v1.1