Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1 |
|
#
f732157a |
| 20-Sep-2024 |
Med Ismail Bennani <ismail@bennani.ma> |
[lldb/Interpreter] Introduce ScriptedStopHook{,Python}Interface & make use of it (#109498)
This patch re-lands #105449 and fixes the various test failures.
---------
Signed-off-by: Med Ismail
[lldb/Interpreter] Introduce ScriptedStopHook{,Python}Interface & make use of it (#109498)
This patch re-lands #105449 and fixes the various test failures.
---------
Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
show more ...
|
#
801046e3 |
| 20-Sep-2024 |
David Spickett <david.spickett@linaro.org> |
Revert "[lldb] Fix SWIG wrapper compilation error"
...and "[lldb/Interpreter] Introduce `ScriptedStopHook{,Python}Interface` & make use of it (#105449)"
This reverts commit 76b827bb4d5b4cc4d3229c4c
Revert "[lldb] Fix SWIG wrapper compilation error"
...and "[lldb/Interpreter] Introduce `ScriptedStopHook{,Python}Interface` & make use of it (#105449)"
This reverts commit 76b827bb4d5b4cc4d3229c4c6de2529e8b156810, and commit 1e131ddfa8f1d7b18c85c6e4079458be8b419421 because the first commit caused the test command-stop-hook-output.test to fail.
show more ...
|
#
1e131ddf |
| 20-Sep-2024 |
Med Ismail Bennani <ismail@bennani.ma> |
[lldb/Interpreter] Introduce `ScriptedStopHook{,Python}Interface` & make use of it (#105449)
This patch introduces new `ScriptedStopHook{,Python}Interface` classes
that make use of the Scripted Int
[lldb/Interpreter] Introduce `ScriptedStopHook{,Python}Interface` & make use of it (#105449)
This patch introduces new `ScriptedStopHook{,Python}Interface` classes
that make use of the Scripted Interface infrastructure and makes use of
it in `StopHookScripted`.
It also relax the requirement on the number of argument for initializing
scripting extension if the size of the interface parameter pack contains
1 less element than the extension maximum number of positional arguments
for this initializer.
This addresses the cases where the embedded interpreter session
dictionary is passed to the extension initializer which is not used most
of the time.
---------
Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
show more ...
|
Revision tags: llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6 |
|
#
b3a835e1 |
| 09-May-2024 |
Med Ismail Bennani <ismail@bennani.ma> |
[lldb] Verify target stop-hooks support with scripted process (#91107)
This patch makes sure that scripted process are compatible with target
stop-hooks. This wasn't tested in the past, but it turn
[lldb] Verify target stop-hooks support with scripted process (#91107)
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>
show more ...
|
Revision tags: llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5 |
|
#
2238dcc3 |
| 25-May-2023 |
Jonas Devlieghere <jonas@devlieghere.com> |
[NFC][Py Reformat] Reformat python files in lldb
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 problem
[NFC][Py Reformat] Reformat python files in lldb
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
show more ...
|
#
8f407b8e |
| 21-May-2023 |
Med Ismail Bennani <ismail@bennani.ma> |
[lldb] Add "Trace" stop reason in Scripted Thread
This patch adds support to eStopReasonTrace to Scripted Threads.
This is necessary when using a Scrited Process with a Scripted Thread Plan to repo
[lldb] Add "Trace" stop reason in Scripted Thread
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>
show more ...
|
Revision tags: llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4 |
|
#
f190ec68 |
| 04-Mar-2023 |
Med Ismail Bennani <medismail.bennani@gmail.com> |
[lldb/Plugins] Add memory writing capabilities to Scripted Process
This patch adds memory writing capabilities to the Scripted Process plugin.
This allows to user to get a target address and a memo
[lldb/Plugins] Add memory writing capabilities to Scripted Process
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>
show more ...
|
Revision tags: llvmorg-16.0.0-rc3 |
|
#
e02a355f |
| 16-Feb-2023 |
Med Ismail Bennani <medismail.bennani@gmail.com> |
[lldb/Plugins] Clean-up Scripted Process interface requirements (NFC)
The goal of the simple patch is to clean-up the scripted process interface by removing methods that were introduced with the int
[lldb/Plugins] Clean-up Scripted Process interface requirements (NFC)
The goal of the simple patch is to clean-up the scripted process interface by removing methods that were introduced with the interface originally, but that were never really implemented (get_thread_with_id & get_registers_for_thread).
This patch also changes `get_memory_region_containing_address` to have a base implementation (that retunrs `None`), instead of forcing the user to override it in their derived class.
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
show more ...
|
Revision tags: llvmorg-16.0.0-rc2 |
|
#
a3d4f739 |
| 07-Feb-2023 |
Med Ismail Bennani <medismail.bennani@gmail.com> |
[lldb/Plugins] Fix method dispatch bug when using multiple scripted processes
This patch should address a bug when a user have multiple scripted processes in the same debugging session.
In order fo
[lldb/Plugins] Fix method dispatch bug when using multiple scripted processes
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>
show more ...
|
#
c1928033 |
| 03-Feb-2023 |
Med Ismail Bennani <medismail.bennani@gmail.com> |
[lldb] Add a way to get a scripted process implementation from the SBAPI
This patch introduces a new `GetScriptedImplementation` method to the SBProcess class in the SBAPI. It will allow users of Sc
[lldb] Add a way to get a scripted process implementation from the SBAPI
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>
show more ...
|
Revision tags: llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7 |
|
#
bb4ccc66 |
| 12-Jan-2023 |
Med Ismail Bennani <medismail.bennani@gmail.com> |
[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 pyth
[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>
show more ...
|
Revision tags: llvmorg-15.0.6 |
|
#
7e01924e |
| 18-Nov-2022 |
Med Ismail Bennani <medismail.bennani@gmail.com> |
[lldb/Plugins] Improve error reporting with reading memory in Scripted Process
This patch improves the ScriptedPythonInterface::Dispatch method to support passing lldb_private types to the python im
[lldb/Plugins] Improve error reporting with reading memory in Scripted Process
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>
show more ...
|
Revision tags: llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2 |
|
#
70665844 |
| 10-Feb-2022 |
Med Ismail Bennani <medismail.bennani@gmail.com> |
[lldb/Plugin] Add artificial stackframe loading in ScriptedThread
This patch adds the ability for ScriptedThread to load artificial stack frames. To do so, the interpreter instance can create a list
[lldb/Plugin] Add artificial stackframe loading in ScriptedThread
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>
show more ...
|
Revision tags: llvmorg-14.0.0-rc1, llvmorg-15-init |
|
#
c3ca2c6b |
| 24-Jan-2022 |
Med Ismail Bennani <medismail.bennani@gmail.com> |
[lldb/test] Fix `TestScriptedProcess.test_scripted_process_and_scripted_thread`
This patch updates `dummy_scripted_process.py` to report the dummy thread correctly to reflect the changes introduced
[lldb/test] Fix `TestScriptedProcess.test_scripted_process_and_scripted_thread`
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>
show more ...
|
Revision tags: llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1 |
|
#
738621d0 |
| 19-Oct-2021 |
Med Ismail Bennani <medismail.bennani@gmail.com> |
[lldb/bindings] Change ScriptedThread initializer parameters
This patch changes the `ScriptedThread` initializer in couple of ways: - It replaces the `SBTarget` parameter by a `SBProcess` (pointing
[lldb/bindings] Change ScriptedThread initializer parameters
This patch changes the `ScriptedThread` initializer in couple of ways: - It replaces the `SBTarget` parameter by a `SBProcess` (pointing to the `ScriptedProcess` that "owns" the `ScriptedThread`). - It adds a reference to the `ScriptedProcessInfo` Dictionary, to pass arbitrary user-input to the `ScriptedThread`.
This patch also fixes the SWIG bindings methods that call the `ScriptedProcess` and `ScriptedThread` initializers by passing all the arguments to the appropriate `PythonCallable` object.
Differential Revision: https://reviews.llvm.org/D112046
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
show more ...
|
#
a758c9f7 |
| 08-Oct-2021 |
Med Ismail Bennani <medismail.bennani@gmail.com> |
[lldb/Plugins] Add memory region support in ScriptedProcess
This patch adds support for memory regions in Scripted Processes. This is necessary to read the stack memory region in order to reconstruc
[lldb/Plugins] Add memory region support in ScriptedProcess
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>
show more ...
|