summaryrefslogtreecommitdiff
path: root/lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py
AgeCommit message (Collapse)Author
2025-09-03[lldb] Mark scripted frames as synthetic instead of artificial (#153117)Med Ismail Bennani
This patch changes the way frames created from scripted affordances like Scripted Threads are displayed. Currently, they're marked artificial which is used usually for compiler generated frames. This patch changes that behaviour by introducing a new synthetic StackFrame kind and moves 'artificial' to be a distinct StackFrame attribut. On top of making these frames less confusing, this allows us to know when a frame was created from a scripted affordance. rdar://155949703 Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2024-05-09[lldb] Verify target stop-hooks support with scripted process (#91107)Med Ismail Bennani
This patch makes sure that scripted process are compatible with target stop-hooks. This wasn't tested in the past, but it turned out to be working out of the box. rdar://124396534 Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2024-02-21[lldb][test] Modernize asserts (#82503)Jordan Rupprecht
This uses [teyit](https://pypi.org/project/teyit/) to modernize asserts, as recommended by the [unittest release notes](https://docs.python.org/3.12/whatsnew/3.12.html#id3). For example, `assertTrue(a == b)` is replaced with `assertEqual(a, b)`. This produces better error messages, e.g. `error: unexpectedly found 1 and 2 to be different` instead of `error: False`.
2023-11-08[lldb][test] Skip ScriptedProcess missing methods test on WindowsDavid Spickett
No dylib on Windows, so the test fails to build.
2023-11-07[lldb] Check for abstract methods implementation in Scripted Plugin Objects ↵Med Ismail Bennani
(#71260) This patch enforces that every scripted object implements all the necessary abstract methods. Every scripted affordance language interface can implement a list of abstract methods name that checked when the object is instanciated. Since some scripting affordances implementations can be derived from template base classes, we can't check the object dictionary since it will contain the definition of the base class, so instead, this checks the scripting class dictionary. Previously, for the various python interfaces, we used `ABC.abstractmethod` decorators but this is too language specific and doesn't work for scripting affordances that are not derived from template base classes (i.e OperatingSystem, ScriptedThreadPlan, ...), so this patch provides generic/language-agnostic checks for every scripted affordance. Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2023-11-07Revert "[lldb] Check for abstract methods implementation in Scripted Plugin ↵Med Ismail Bennani
Objects (#71260)" This reverts commit cc9ad72713405ef8f2468c7a714a137b4a3343ba since it breaks some tests upstream: https://lab.llvm.org/buildbot/#/builders/68/builds/63112 ******************** Failed Tests (4): lldb-api :: functionalities/gdb_remote_client/TestThreadSelectionBug.py lldb-api :: functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py lldb-api :: functionalities/plugins/python_os_plugin/stepping_plugin_threads/TestOSPluginStepping.py lldb-api :: functionalities/postmortem/mach-core/TestMachCore.py
2023-11-07[lldb] Check for abstract methods implementation in Scripted Plugin Objects ↵Med Ismail Bennani
(#71260) This patch enforces that every scripted object implements all the necessary abstract methods. Every scripted affordance language interface can implement a list of abstract methods name that checked when the object is instanciated. Since some scripting affordances implementations can be derived from template base classes, we can't check the object dictionary since it will contain the definition of the base class, so instead, this checks the scripting class dictionary. Previously, for the various python interfaces, we used `ABC.abstractmethod` decorators but this is too language specific and doesn't work for scripting affordances that are not derived from template base classes (i.e OperatingSystem, ScriptedThreadPlan, ...), so this patch provides generic/language-agnostic checks for every scripted affordance. Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2023-05-25[NFC][Py Reformat] Reformat python files in lldbJonas Devlieghere
This is an ongoing series of commits that are reformatting our Python code. Reformatting is done with `black` (23.1.0). If you end up having problems merging this commit because you have made changes to a python file, the best way to handle that is to run `git checkout --ours <yourfile>` and then reformat it with black. RFC: https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style Differential revision: https://reviews.llvm.org/D151460
2023-05-22[lldb] Add "Trace" stop reason in Scripted ThreadMed Ismail Bennani
This patch adds support to eStopReasonTrace to Scripted Threads. This is necessary when using a Scrited Process with a Scripted Thread Plan to report a special thread stop reason to the thread plan. rdar://109425542 Differential Revision: https://reviews.llvm.org/D151043 Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2023-03-03[lldb/swig] Fix ref counting issue in SBProcess::GetScriptedImplementationMed Ismail Bennani
When using SBProcess::GetScriptedImplementation in python, if the process has a valid implementation, we returned a reference of the object without incrementing the reference counting. That causes the interpreter to crash after accessing the reference several times. This patch address this by incrementing the reference count when passing the valid object reference. Differential Revision: https://reviews.llvm.org/D145260 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2023-03-03[lldb/Plugins] Add memory writing capabilities to Scripted ProcessMed Ismail Bennani
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>
2023-03-03[lldb/Plugins] Add Attach capabilities to ScriptedProcessMed Ismail Bennani
This patch adds process attach capabilities to the ScriptedProcess plugin. This doesn't really expects a PID or process name, since the process state is already script, however, this allows to create a scripted process without requiring to have an executuble in the target. In order to do so, this patch also turns the scripted process related getters and setters from the `ProcessLaunchInfo` and `ProcessAttachInfo` classes to a `ScriptedMetadata` instance and moves it in the `ProcessInfo` class, so it can be accessed interchangeably. This also adds the necessary SWIG wrappers to convert the internal `Process{Attach,Launch}InfoSP` into a `SB{Attach,Launch}Info` to pass it as argument the scripted process python implementation and convert it back to the internal representation. rdar://104577406 Differential Revision: https://reviews.llvm.org/D143104 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2023-02-06[lldb/Plugins] Fix method dispatch bug when using multiple scripted processesMed Ismail Bennani
This patch should address a bug when a user have multiple scripted processes in the same debugging session. In order for the scripted process plugin to be able to call into the scripted object instance methods to fetch the necessary data to reconstruct its state, the scripted process plugin calls into a scripted process interface, that has a reference to the created script object instance. However, prior to this patch, we only had a single instance of the scripted process interface, living the script interpreter. So every time a new scripted process plugin was created, it would overwrite the script object instance that was held by the single scripted process interface in the script interpreter. That would cause all the method calls made to the scripted process interface to be dispatched by the last instanciated script object instance, which is wrong. In order to prevent that, this patch moves the scripted process interface reference to be help by the scripted process plugin itself. rdar://104882562 Differential Revision: https://reviews.llvm.org/D143308 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2023-02-03[lldb] Add a way to get a scripted process implementation from the SBAPIMed Ismail Bennani
This patch introduces a new `GetScriptedImplementation` method to the SBProcess class in the SBAPI. It will allow users of Scripted Processes to fetch the scripted implementation object from to script interpreter to be able to interact with it directly (without having to go through lldb). This allows to user to perform action that are not specified in the scripted process interface, like calling un-specified methods, but also to enrich the implementation, by passing it complex objects. Differential Revision: https://reviews.llvm.org/D143236 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2023-01-12[lldb/test] Disable TestScriptedProcess.py on linux while investigating the ↵Med Ismail Bennani
issue Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-11-18[lldb/Plugins] Improve error reporting with reading memory in Scripted ProcessMed Ismail Bennani
This patch improves the ScriptedPythonInterface::Dispatch method to support passing lldb_private types to the python implementation. This will allow, for instance, the Scripted Process python implementation to report errors when reading memory back to lldb. To do so, the Dispatch method will transform the private types in the parameter pack into `PythonObject`s to be able to pass them down to the python methods. Then, if the call succeeded, the transformed arguments will be converted back to their original type and re-assigned in the parameter pack, to ensure pointers and references behaviours are preserved. This patch also updates various scripted process python class and tests to reflect this change. rdar://100030995 Differential Revision: https://reviews.llvm.org/D134033 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-10-27[lldb][test] Remove empty setUp/tearDown methods (NFC)Dave Lee
2022-08-03[lldb] Add assertStopReason helper functionJonas Devlieghere
Add a function to make it easier to debug a test failure caused by an unexpected stop reason. This is similar to the assertState helper that was added in ce825e46743b. Before: self.assertEqual(stop_reason, lldb.eStopReasonInstrumentation) AssertionError: 5 != 10 After: self.assertStopReason(stop_reason, lldb.eStopReasonInstrumentation) AssertionError: signal (5) != instrumentation (10) Differential revision: https://reviews.llvm.org/D131083
2022-06-17[lldb][tests] Automatically call compute_mydir (NFC)Dave Lee
Eliminate boilerplate of having each test manually assign to `mydir` by calling `compute_mydir` in lldbtest.py. Differential Revision: https://reviews.llvm.org/D128077
2022-03-10[lldb/Plugin] Test that a scripted process blueprint can be loaded for the dSYMMed Ismail Bennani
This patch ensures that lldb can automatically load a scripted process blueprint from a dSYM bundle and launch a scripted process with it. rdar://74502750 Differential Revision: https://reviews.llvm.org/D121316 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-03-04[lldb/Test] Disable test_scripted_process_and_scripted_thread on WindowsMed Ismail Bennani
This disables TestScriptedProcess.test_scripted_process_and_scripted_thread on Windows since the inferior binary a linked to a dylib that doesn't build on Windows. This should fix https://lab.llvm.org/buildbot/#/builders/83/builds/16100 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-02-16[lldb/Plugin] Add artificial stackframe loading in ScriptedThreadMed Ismail Bennani
This patch adds the ability for ScriptedThread to load artificial stack frames. To do so, the interpreter instance can create a list that will contain the frame index and its pc address. Then, when the Scripted Process plugin stops, it will refresh its Scripted Threads state by invalidating their register context and load to list from the interpreter object and reconstruct each frame. This patch also removes all of the default implementation for `get_stackframes` from the derived ScriptedThread classes, and add the interface code for the Scripted Thread Interface. rdar://88721095 Differential Revision: https://reviews.llvm.org/D119388 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-02-14[lldb] Replace asserts on .Success() with assertSuccess()Dave Lee
Replace forms of `assertTrue(err.Success())` with `assertSuccess(err)` (added in D82759). * `assertSuccess` prints out the error's message * `assertSuccess` expresses explicit higher level semantics, both to the reader and for test failure output * `assertSuccess` seems not to be well known, using it where possible will help spread knowledge * `assertSuccess` statements are more succinct Differential Revision: https://reviews.llvm.org/D119616
2022-02-09[lldb/test] Split Scripted Process test in multiple tests (NFC)Med Ismail Bennani
This splits the scripted process tests to be able to run in parallel since some of test functions can take a very long time to run. This also disables debug info testing. Differential Revision: https://reviews.llvm.org/D118513 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-02-09[lldb/test] Fix TestScriptedProcess.py timeout on x86_64Med Ismail Bennani
This patch fixes a timeout issue on the ScriptedProcess test that was happening on intel platforms. The timeout was due to a misreporting of the StopInfo in the ScriptedThread that caused the ScriptedProcess to never stop. To solve this, this patch changes the way a ScriptedThread reports its stop reason by making it more architecture specific. In order to do so, this patch also refactors the ScriptedProcess & ScriptedThread initializer methods to provide an easy access to the target architecture. Differential Revision: https://reviews.llvm.org/D118484 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-01-27[lldb/test] Disable test_launch_scripted_process_stack_frames on x86_64Med Ismail Bennani
There seems to be an issue on x86_64 when launching a ScriptdProcess. This disables temporarely the test that causes the bot to timeout until I finish investigating the issue. Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-01-27Revert "[lldb/test] Try to fix TestSBModule failure"Med Ismail Bennani
This reverts commit 326516448c839d8f9cc515b20a34d0f3a6ee2374.
2022-01-27[lldb/test] Try to fix TestSBModule failureMed Ismail Bennani
This should fix https://lab.llvm.org/buildbot/#/builders/68/builds/25571 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-01-24[lldb/test] Fix `TestScriptedProcess.test_scripted_process_and_scripted_thread`Med Ismail Bennani
This patch updates `dummy_scripted_process.py` to report the dummy thread correctly to reflect the changes introduced by `d3e0f7e`. Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-01-24[lldb/Plugins] Enrich ScriptedThreads Stop Reasons with ExceptionsMed Ismail Bennani
This patch adds Exceptions to the list of supported stop reasons for Scripted Threads. The main motivation for this is that breakpoints are triggered as a special exception class on ARM platforms, so adding it as a stop reason allows the ScriptedProcess to selected the ScriptedThread that stopped at a breakpoint (or crashed :p). rdar://87430376 Differential Revision: https://reviews.llvm.org/D117074 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-01-24[lldb/Plugins] Add support of multiple ScriptedThreads in a ScriptedProcessMed Ismail Bennani
This patch adds support of multiple Scripted Threads in a ScriptedProcess. This is done by fetching the Scripted Threads info dictionary at every ScriptedProcess::DoUpdateThreadList and iterate over each element to create a new ScriptedThread using the object instance, if it was not already available. This patch also adds the ability to pass a pointer of a script interpreter object instance to initialize a ScriptedInterface instead of having to call the script object initializer in the ScriptedInterface constructor. This is used to instantiate the ScriptedThreadInterface from the ScriptedThread constructor, to be able to perform call on that script interpreter object instance. Finally, the patch also updates the scripted process test to check for multiple threads. rdar://84507704 Differential Revision: https://reviews.llvm.org/D117071 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2021-12-13[lldb/plugin] Fix heap-use-after-free in ScriptedProcess::ReadMemoryMed Ismail Bennani
This commit should fix a heap-use-after-free bug that was caught by the sanitizer bot. The issue is that we were reading memory from a second target into a `SBData` object in Python, that was passed to lldb's internal `ScriptedProcess::DoReadMemory` C++ method. The ScriptedPythonInterface then extracts the underlying `DataExtractor` from the `SBData` object, and is used to read the memory with the appropriate address size and byte order. Unfortunately, it seems that even though the DataExtractor object was still valid, it pointed to invalid, possibly garbage-collected memory from Python. To mitigate this, the patch uses `SBData::SetDataWithOwnership` to copy the pointed buffer to lldb's heap memory which prevents the use-after-free error. rdar://84511405 Differential Revision: https://reviews.llvm.org/D115654 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2021-12-06[lldb/test] Fix InvalidScriptedThread windows test failureMed Ismail Bennani
This patch should fix a Windows test failure for the InvalidScriptedThread test: https://lab.llvm.org/buildbot/#/builders/83/builds/12571 This refactors the test to stop using python `tempfile` since it's not supported on Windows and creates a logfile at runtime in the test folder. Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2021-12-06[lldb/plugins] Add arm64(e) support to ScriptedProcessMed Ismail Bennani
This patch adds support for arm64(e) targets to ScriptedProcess, by providing the `DynamicRegisterInfo` to the base `lldb.ScriptedThread` class. This allows create and debugging ScriptedProcess on Apple Silicon hardware as well as Apple mobile devices. It also replace the C++ asserts on `ScriptedThread::GetDynamicRegisterInfo` by some error logging, re-enables `TestScriptedProcess` for arm64 Darwin platforms and adds a new invalid Scripted Thread test. rdar://85892451 Differential Revision: https://reviews.llvm.org/D114923 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2021-12-01[lldb] Skip test_launch_scripted_process_stack_frames with ASanJonas Devlieghere
This test is failing on the sanitized bot because of a heap-use-after-free. Disabling the test to turn the bot green again. rdar://85954489.
2021-11-10[lldb/test] Skip TestScriptedProcess when using system's debugserver (NFC)Med Ismail Bennani
Because TestScriptedProcess.py creates a skinny corefile to provides data to the ScriptedProcess and ScriptedThread, we need to make sure that the debugserver used is not out of tree, to ensure feature availability between debugserver and lldb. This also removes the `SKIP_SCRIPTED_PROCESS_LAUNCH` env variable after each test finish running. Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2021-11-10[lldb/test] Update TestScriptedProcess to use skinny corefilesMed Ismail Bennani
This patch changes the ScriptedProcess test to use a stack-only skinny corefile as a backing store. The corefile is saved as a temporary file at the beginning of the test, and a second target is created for the ScriptedProcess. To do so, we use the SBAPI from the ScriptedProcess' python script to interact with the corefile process. This patch also makes some small adjustments to the other ScriptedProcess scripts to resolve some inconsistencies and removes the raw memory dump that was previously checked in. Differential Revision: https://reviews.llvm.org/D112047 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2021-10-11[LLDB] Skip TestScriptedProcess on Arm/AArch64 LinuxMuhammad Omair Javaid
This is failing on Arm and AArch64 Linux buildbots since the time it was comitted. https://lab.llvm.org/buildbot/#/builders/96/builds/12628 Differential Revision: https://reviews.llvm.org/D107585
2021-10-10[lldb/test] Disable 'TestScriptedProcess.py' on macOSMed Ismail Bennani
This is disabling 'TestScriptedProcess.py' on macOS since it fails on Green Dragon: https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/35974 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2021-10-08[lldb/test] Disable TestScriptedProcess.py unless DarwinMed Ismail Bennani
This patch disables TestScriptedProcess.py on Linux and Windows while I investigate the OS specific failure: http://lab.llvm.org:8011/#/builders/68/builds/19793 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2021-10-08[lldb/Plugins] Add memory region support in ScriptedProcessMed Ismail Bennani
This patch adds support for memory regions in Scripted Processes. This is necessary to read the stack memory region in order to reconstruct each stackframe of the program. In order to do so, this patch makes some changes to the SBAPI, namely: - Add a new constructor for `SBMemoryRegionInfo` that takes arguments such as the memory region name, address range, permissions ... This is used when reading memory at some address to compute the offset in the binary blob provided by the user. - Add a `GetMemoryRegionContainingAddress` method to `SBMemoryRegionInfoList` to simplify the access to a specific memory region. With these changes, lldb is now able to unwind the stack and reconstruct each frame. On top of that, reloading the target module at offset 0 allows lldb to symbolicate the `ScriptedProcess` using debug info, similarly to an ordinary Process. To test this, I wrote a simple program with multiple function calls, ran it in lldb, stopped at a leaf function and read the registers values and copied the stack memory into a binary file. These are then used in the python script. Differential Revision: https://reviews.llvm.org/D108953 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2021-10-08[lldb/Plugins] Add support for ScriptedThread in ScriptedProcessMed Ismail Bennani
This patch introduces the `ScriptedThread` class with its python interface. When used with `ScriptedProcess`, `ScriptedThreaad` can provide various information such as the thread state, stop reason or even its register context. This can be used to reconstruct the program stack frames using lldb's unwinder. rdar://74503836 Differential Revision: https://reviews.llvm.org/D107585 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2021-07-22[lldb/Plugins] Add ScriptedProcess Process PluginMed Ismail Bennani
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/D100384 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2021-03-24Revert "[lldb/Plugins] Add ScriptedProcess Process Plugin"Med Ismail Bennani
Reverting commit b09d44b6ae0901865a0d4b2a0cf797c3cd34eeeb, since it breaks the windows bots: https://lab.llvm.org/buildbot/#/builders/83/builds/4993 It seems to crash the `TestIRMemoryMapWindows.test` test.
2021-03-24[lldb/Plugins] Add ScriptedProcess Process PluginMed Ismail Bennani
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>
2021-03-24Revert "[lldb/Plugins] Add ScriptedProcess Process Plugin"David Zarzycki
This reverts commit dd391e1ef762d79f86112dc2480a89c9be066ce1. This patch causes 17 LLDB test regressions on Fedora 33 (x86-64).
2021-03-23[lldb/Plugins] Add ScriptedProcess Process PluginMed Ismail Bennani
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>
2021-03-23[lldb/bindings] Add Python ScriptedProcess base class to lldb moduleMed Ismail Bennani
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 `MyScriptedProcess` class. rdar://65508855 Differential Revision: https://reviews.llvm.org/D95712 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2021-03-01[lldb] Revert ScriptedProcess patchesMed Ismail Bennani
This patch reverts the following commits: - 5a9c34918bb1526b7e8c29aa5e4fb8d8e27e27b4 - 46796762afe76496ec4dd900f64d0cf4cdc30e99 - 2cff3dec1171188ce04ab1a4373cc1885ab97be1 - 182f0d1a34419445bb19d67581d6ac1afc98b7fa - d62a53aaf1d38a55d1affbd3a30d564a4e9d3171 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2021-03-01[lldb/Plugins] Add ScriptedProcess Process PluginMed Ismail Bennani
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>