Revision tags: 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 |
|
#
9c246882 |
| 21-Feb-2024 |
Jordan Rupprecht <rupprecht@google.com> |
[lldb][test] Modernize asserts (#82503)
This uses [teyit](https://pypi.org/project/teyit/) to modernize asserts,
as recommended by the [unittest release
notes](https://docs.python.org/3.12/whatsne
[lldb][test] Modernize asserts (#82503)
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`.
show more ...
|
Revision tags: 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 |
|
#
ea828534 |
| 08-Nov-2023 |
David Spickett <david.spickett@linaro.org> |
[lldb][test] Skip ScriptedProcess missing methods test on Windows
No dylib on Windows, so the test fails to build.
|
#
0a211446 |
| 08-Nov-2023 |
Med Ismail Bennani <ismail@bennani.ma> |
[lldb] Check for abstract methods implementation in Scripted Plugin Objects (#71260)
This patch enforces that every scripted object implements all the necessary abstract methods.
Every scripted aff
[lldb] Check for abstract methods implementation in Scripted Plugin Objects (#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>
show more ...
|
#
c2ad9f8b |
| 07-Nov-2023 |
Med Ismail Bennani <ismail@bennani.ma> |
Revert "[lldb] Check for abstract methods implementation in Scripted Plugin Objects (#71260)"
This reverts commit cc9ad72713405ef8f2468c7a714a137b4a3343ba since it breaks some tests upstream:
https
Revert "[lldb] Check for abstract methods implementation in Scripted Plugin 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
show more ...
|
#
cc9ad727 |
| 07-Nov-2023 |
Med Ismail Bennani <ismail@bennani.ma> |
[lldb] Check for abstract methods implementation in Scripted Plugin Objects (#71260)
This patch enforces that every scripted object implements all the
necessary abstract methods.
Every scripted
[lldb] Check for abstract methods implementation in Scripted Plugin Objects (#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>
show more ...
|
Revision tags: 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 |
|
#
ebdbc26a |
| 03-Mar-2023 |
Med Ismail Bennani <medismail.bennani@gmail.com> |
[lldb/swig] Fix ref counting issue in SBProcess::GetScriptedImplementation
When using SBProcess::GetScriptedImplementation in python, if the process has a valid implementation, we returned a referen
[lldb/swig] Fix ref counting issue in SBProcess::GetScriptedImplementation
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>
show more ...
|
#
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 ...
|
#
b9d4c94a |
| 03-Mar-2023 |
Med Ismail Bennani <medismail.bennani@gmail.com> |
[lldb/Plugins] Add Attach capabilities to ScriptedProcess
This patch adds process attach capabilities to the ScriptedProcess plugin. This doesn't really expects a PID or process name, since the proc
[lldb/Plugins] Add Attach capabilities to ScriptedProcess
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>
show more ...
|
Revision tags: llvmorg-16.0.0-rc3, 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 |
|
#
d69e5dfa |
| 12-Jan-2023 |
Med Ismail Bennani <medismail.bennani@gmail.com> |
[lldb/test] Disable TestScriptedProcess.py on linux while investigating the issue
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
|
Revision tags: llvmorg-15.0.7, 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 |
|
#
995d556f |
| 27-Oct-2022 |
Dave Lee <davelee.com@gmail.com> |
[lldb][test] Remove empty setUp/tearDown methods (NFC)
|
Revision tags: 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 |
|
#
0f821339 |
| 03-Aug-2022 |
Jonas Devlieghere <jonas@devlieghere.com> |
[lldb] Add assertStopReason helper function
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
[lldb] Add assertStopReason helper function
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
show more ...
|
Revision tags: llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6 |
|
#
4cc8f2a0 |
| 17-Jun-2022 |
Dave Lee <davelee.com@gmail.com> |
[lldb][tests] Automatically call compute_mydir (NFC)
Eliminate boilerplate of having each test manually assign to `mydir` by calling `compute_mydir` in lldbtest.py.
Differential Revision: https://r
[lldb][tests] Automatically call compute_mydir (NFC)
Eliminate boilerplate of having each test manually assign to `mydir` by calling `compute_mydir` in lldbtest.py.
Differential Revision: https://reviews.llvm.org/D128077
show more ...
|
Revision tags: 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 |
|
#
6aa48034 |
| 09-Mar-2022 |
Med Ismail Bennani <medismail.bennani@gmail.com> |
[lldb/Plugin] Test that a scripted process blueprint can be loaded for the dSYM
This patch ensures that lldb can automatically load a scripted process blueprint from a dSYM bundle and launch a scrip
[lldb/Plugin] Test that a scripted process blueprint can be loaded for the dSYM
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>
show more ...
|
#
86e6030e |
| 04-Mar-2022 |
Med Ismail Bennani <medismail.bennani@gmail.com> |
[lldb/Test] Disable test_scripted_process_and_scripted_thread on Windows
This disables TestScriptedProcess.test_scripted_process_and_scripted_thread on Windows since the inferior binary a linked to
[lldb/Test] Disable test_scripted_process_and_scripted_thread on Windows
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>
show more ...
|
Revision tags: 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 ...
|
#
779bbbf2 |
| 12-Feb-2022 |
Dave Lee <davelee.com@gmail.com> |
[lldb] Replace asserts on .Success() with assertSuccess()
Replace forms of `assertTrue(err.Success())` with `assertSuccess(err)` (added in D82759).
* `assertSuccess` prints out the error's message
[lldb] Replace asserts on .Success() with assertSuccess()
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
show more ...
|
Revision tags: llvmorg-14.0.0-rc1 |
|
#
d327108d |
| 08-Feb-2022 |
Med Ismail Bennani <medismail.bennani@gmail.com> |
[lldb/test] Split Scripted Process test in multiple tests (NFC)
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.
T
[lldb/test] Split Scripted Process test in multiple tests (NFC)
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>
show more ...
|
#
f5e5074c |
| 08-Feb-2022 |
Med Ismail Bennani <medismail.bennani@gmail.com> |
[lldb/test] Fix TestScriptedProcess.py timeout on x86_64
This patch fixes a timeout issue on the ScriptedProcess test that was happening on intel platforms. The timeout was due to a misreporting of
[lldb/test] Fix TestScriptedProcess.py timeout on x86_64
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>
show more ...
|
Revision tags: llvmorg-15-init |
|
#
48c36a15 |
| 27-Jan-2022 |
Med Ismail Bennani <medismail.bennani@gmail.com> |
[lldb/test] Disable test_launch_scripted_process_stack_frames on x86_64
There seems to be an issue on x86_64 when launching a ScriptdProcess. This disables temporarely the test that causes the bot t
[lldb/test] Disable test_launch_scripted_process_stack_frames on x86_64
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>
show more ...
|