[Lldb-commits] [PATCH] D95709: [lldb/Commands] Add command options for ScriptedProcess to ProcessLaunch
Med Ismail Bennani via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Jan 29 17:04:39 PST 2021
mib created this revision.
mib added reviewers: LLDB, JDevlieghere, jasonmolenda, jingham, labath.
Herald added subscribers: dang, mgorny.
mib requested review of this revision.
Herald added a project: LLDB.
This patch adds a new command options to the CommandObjectProecessLaunch
for scripted processes.
Among the options, the user need to specify the class name managing the
scripted process. The user can also use a key-value dictionary holding
arbitrary data that will be passed to the managing class.
rdar://65508855
Signed-off-by: Med Ismail Bennani <medismail.bennani at gmail.com>
[lldb/Interpreter] Add ScriptInterpreter Wrapper for ScriptedProcess
This patch adds a ScriptedProcess interface to the ScriptInterpreter and
more specifically, to the ScriptInterpreterPython.
This interface will be used in the C++ `ScriptProcess` Process Plugin to
call the script methods.
At the moment, not all methods are implemented, they will upstreamed in
upcoming patches.
rdar://65508855
Signed-off-by: Med Ismail Bennani <medismail.bennani at gmail.com>
[lldb/bindings] Add Python ScriptedProcess base class to lldb module
In order to facilitate the writting of Scripted Processes, this patch
introduces a `ScriptedProcess` python base class in the lldb module.
The base class holds the python interface with all the - abstract -
methods that need to be implemented by the inherited class but also some
methods that can be overwritten.
This patch also provides an example of a Scripted Process with the
`ScriptedMachCoreProcess` class.
rdar://65508855
Signed-off-by: Med Ismail Bennani <medismail.bennani at gmail.com>
[lldb/Plugins] Add ScriptedProcess Process Plugin
This patch introduces Scripted Processes to lldb.
The goal, here, is to be able to attach to fake processes in the debugger
that are backed my scripts (Python, Lua, Swift, etc ...) and inspect
them statically.
Scripted Processes can be used in cooperative multithreading environments
like the XNU Kernel or other real-time operating systems, but it can
also help us improve the debugger testing infrastructure by writting
synthetic tests that simulates hard-to-reproduce process/thread states.
Although ScriptedProcess is not feature-complete at the moment, it has
basic execution capabilities and will improve in the following patches.
rdar://65508855
Signed-off-by: Med Ismail Bennani <medismail.bennani at gmail.com>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D95709
Files:
lldb/bindings/python/python-scripted-process.swig
lldb/bindings/python/python-wrapper.swig
lldb/bindings/python/python.swig
lldb/examples/python/scripted_process.py
lldb/include/lldb/Host/ProcessLaunchInfo.h
lldb/include/lldb/Interpreter/ScriptInterpreter.h
lldb/include/lldb/lldb-forward.h
lldb/source/Commands/CommandObjectPlatform.cpp
lldb/source/Commands/CommandObjectProcess.cpp
lldb/source/Commands/CommandOptionsProcessLaunch.cpp
lldb/source/Commands/CommandOptionsProcessLaunch.h
lldb/source/Commands/Options.td
lldb/source/Host/common/ProcessLaunchInfo.cpp
lldb/source/Plugins/Process/CMakeLists.txt
lldb/source/Plugins/Process/Scripted/CMakeLists.txt
lldb/source/Plugins/Process/Scripted/ScriptedProcess.cpp
lldb/source/Plugins/Process/Scripted/ScriptedProcess.h
lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
lldb/source/Target/Target.cpp
lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95709.320241.patch
Type: text/x-patch
Size: 41109 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210130/a9647ac3/attachment-0001.bin>
More information about the lldb-commits
mailing list