[lldb/Plugins] Add ScriptedProcess Process Plugin
authorMed Ismail Bennani <medismail.bennani@gmail.com>
Wed, 24 Mar 2021 15:11:51 +0000 (15:11 +0000)
committerMed Ismail Bennani <medismail.bennani@gmail.com>
Wed, 24 Mar 2021 18:10:58 +0000 (19:10 +0100)
commitb09d44b6ae0901865a0d4b2a0cf797c3cd34eeeb
treea9ebf23c20b448e6e82f91ef59b898c0d84e5c5d
parent1818dc394f3172a44df07adf754110d7ecca5e13
[lldb/Plugins] Add ScriptedProcess Process Plugin

This patch introduces Scripted Processes to lldb.

The goal, here, is to be able to attach in the debugger to fake processes
that are backed by script files (in 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

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

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
lldb/bindings/python/CMakeLists.txt
lldb/include/lldb/Target/Process.h
lldb/source/Plugins/Process/CMakeLists.txt
lldb/source/Plugins/Process/scripted/CMakeLists.txt [new file with mode: 0644]
lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp [new file with mode: 0644]
lldb/source/Plugins/Process/scripted/ScriptedProcess.h [new file with mode: 0644]
lldb/source/Target/Target.cpp
lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py