#
bbc457a4 |
| 28-Jul-2024 |
Med Ismail Bennani <ismail@bennani.ma> |
Revert "[lldb] Add ScriptedProcess to `scripting template list`"
This reverts commit 2402b3213c2f10d5033b31df3a0e59e4ad151fbd since it breaks the windows bot:
https://lab.llvm.org/buildbot/#/builde
Revert "[lldb] Add ScriptedProcess to `scripting template list`"
This reverts commit 2402b3213c2f10d5033b31df3a0e59e4ad151fbd since it breaks the windows bot:
https://lab.llvm.org/buildbot/#/builders/141/builds/1175/
show more ...
|
#
2402b321 |
| 28-Jul-2024 |
Med Ismail Bennani <ismail@bennani.ma> |
[lldb] Add ScriptedProcess to `scripting template list`
This patch is a follow-up to bccff3baeff8 which adds the `ScriptedProcess` extension to the `scripting template list` command as well as its d
[lldb] Add ScriptedProcess to `scripting template list`
This patch is a follow-up to bccff3baeff8 which adds the `ScriptedProcess` extension to the `scripting template list` command as well as its description.
Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
show more ...
|
#
995f643f |
| 27-Jul-2024 |
Med Ismail Bennani <ismail@bennani.ma> |
[lldb] Add OperatingSystem to `scripting template list`
This patch is a follow-up to bccff3baeff8 which adds the `OperatingSystem` extension to the `scripting template list` command as well as its d
[lldb] Add OperatingSystem to `scripting template list`
This patch is a follow-up to bccff3baeff8 which adds the `OperatingSystem` extension to the `scripting template list` command as well as its description.
Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
show more ...
|
#
ecf125ea |
| 27-Jul-2024 |
Med Ismail Bennani <ismail@bennani.ma> |
[lldb] Add ScriptedPlatform to `scripting template list`
This patch is a follow-up to bccff3baeff8 which adds the `ScriptedPlatform` extension to the `scripting template list` command as well as its
[lldb] Add ScriptedPlatform to `scripting template list`
This patch is a follow-up to bccff3baeff8 which adds the `ScriptedPlatform` extension to the `scripting template list` command as well as its description.
Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
show more ...
|
#
bccff3ba |
| 27-Jul-2024 |
Med Ismail Bennani <ismail@bennani.ma> |
[lldb/Commands] Add `scripting template list` command with auto discovery
This patch introduces a new `template` multiword sub-command to the `scripting` top-level command. As the name suggests, thi
[lldb/Commands] Add `scripting template list` command with auto discovery
This patch introduces a new `template` multiword sub-command to the `scripting` top-level command. As the name suggests, this sub-command operates on scripting templates, and currently has the ability to automatically discover the various scripting extensions that lldb supports.
This was previously reviewed in #97273.
Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
show more ...
|
Revision tags: llvmorg-19.1.0-rc1 |
|
#
e8504cb0 |
| 26-Jul-2024 |
Med Ismail Bennani <ismail@bennani.ma> |
[lldb] Revert scripting template list patches (#100673)
Reverts https://github.com/llvm/llvm-project/pull/97273 since it broke
the windows bot:
https://lab.llvm.org/buildbot/#/builders/141/build
[lldb] Revert scripting template list patches (#100673)
Reverts https://github.com/llvm/llvm-project/pull/97273 since it broke
the windows bot:
https://lab.llvm.org/buildbot/#/builders/141/builds/1025/steps/4/logs/stdio
show more ...
|
#
0d4f9484 |
| 25-Jul-2024 |
Med Ismail Bennani <ismail@bennani.ma> |
[lldb/Plugins] Fix build failure on windows following 2914a4b88837
This patch tries to fix the following build failure on windows:
https://lab.llvm.org/buildbot/#/builders/141/builds/1083
This sta
[lldb/Plugins] Fix build failure on windows following 2914a4b88837
This patch tries to fix the following build failure on windows:
https://lab.llvm.org/buildbot/#/builders/141/builds/1083
This started happening following 2914a4b88837, and it seems to be caused by some special `#include` ordering for the lldb-python header on Windows.
Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
show more ...
|
#
2914a4b8 |
| 25-Jul-2024 |
Med Ismail Bennani <ismail@bennani.ma> |
[lldb/Commands] Add `scripting template list` command with auto discovery
This patch introduces a new `template` multiword sub-command to the `scripting` top-level command. As the name suggests, thi
[lldb/Commands] Add `scripting template list` command with auto discovery
This patch introduces a new `template` multiword sub-command to the `scripting` top-level command. As the name suggests, this sub-command operates on scripting templates, and currently has the ability to automatically discover the various scripting extensions that lldb supports.
This was previously reviewed in #97273.
Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
show more ...
|
#
39c23a31 |
| 23-Jul-2024 |
Med Ismail Bennani <ismail@bennani.ma> |
Revert "[lldb/Commands] Add `scripting template list` command with auto discovery" (#100273)
Reverts llvm/llvm-project#97273 since it broke the windows bot:
https://lab.llvm.org/buildbot/#/builde
Revert "[lldb/Commands] Add `scripting template list` command with auto discovery" (#100273)
Reverts llvm/llvm-project#97273 since it broke the windows bot:
https://lab.llvm.org/buildbot/#/builders/141/builds/1025/steps/4/logs/stdio
show more ...
|
#
43ca6314 |
| 23-Jul-2024 |
Med Ismail Bennani <ismail@bennani.ma> |
[lldb/Commands] Add `scripting template list` command with auto discovery (#97273)
This patch introduces a new `template` multiword sub-command to the
`scripting` top-level command. As the name sug
[lldb/Commands] Add `scripting template list` command with auto discovery (#97273)
This patch introduces a new `template` multiword sub-command to the
`scripting` top-level command. As the name suggests, this sub-command
operates on scripting templates, and currently has the ability to
automatically discover the various scripting extensions that lldb
supports.
Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
show more ...
|
Revision tags: llvmorg-20-init |
|
#
77d131ed |
| 03-Jul-2024 |
jimingham <jingham@apple.com> |
Add the ability for Script based commands to specify their "repeat command" (#94823)
Among other things, returning an empty string as the repeat command
disables auto-repeat, which can be useful fo
Add the ability for Script based commands to specify their "repeat command" (#94823)
Among other things, returning an empty string as the repeat command
disables auto-repeat, which can be useful for state-changing commands.
There's one remaining refinement to this setup, which is that for parsed
script commands, it should be possible to change an option value, or add
a new option value that wasn't originally specified, then ask lldb "make
this back into a command string". That would make doing fancy things
with repeat commands easier.
That capability isn't present in the lldb_private side either, however.
So that's for a next iteration.
I haven't added this to the docs on adding commands yet. I wanted to
make sure this was an acceptable approach before I spend the time to do
that.
show more ...
|
#
9a9ec228 |
| 27-Jun-2024 |
Med Ismail Bennani <ismail@bennani.ma> |
[lldb] Make use of Scripted{Python,}Interface for ScriptedThreadPlan (#70392) (#96868)
This patch makes ScriptedThreadPlan conforming to the ScriptedInterface
& ScriptedPythonInterface facilities b
[lldb] Make use of Scripted{Python,}Interface for ScriptedThreadPlan (#70392) (#96868)
This patch makes ScriptedThreadPlan conforming to the ScriptedInterface
& ScriptedPythonInterface facilities by introducing 2
ScriptedThreadPlanInterface & ScriptedThreadPlanPythonInterface classes.
This allows us to get rid of every ScriptedThreadPlan-specific SWIG
method and re-use the same affordances as other scripting offordances,
like Scripted{Process,Thread,Platform} & OperatingSystem.
To do so, this adds new transformer methods for `ThreadPlan`, `Stream` &
`Event`, to allow the bijection between C++ objects and their python
counterparts.
This just re-lands #70392 after fixing test failures.
Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
show more ...
|
Revision tags: llvmorg-18.1.8, llvmorg-18.1.7 |
|
#
af318833 |
| 23-May-2024 |
Adrian Prantl <aprantl@apple.com> |
Add a createError variant without error code (NFC) (#93209)
For the significant amount of call sites that want to create an
incontrovertible error, such a wrapper function creates a significant
re
Add a createError variant without error code (NFC) (#93209)
For the significant amount of call sites that want to create an
incontrovertible error, such a wrapper function creates a significant
readability improvement and lowers the cost of entry to add error
handling in more places.
show more ...
|
#
ae3f6806 |
| 23-May-2024 |
Med Ismail Bennani <ismail@bennani.ma> |
Revert "[lldb] Make use of Scripted{Python,}Interface for ScriptedThreadPlan (Reland #70392)" (#93153)
Reverts llvm/llvm-project#93149 since it breaks
https://lab.llvm.org/buildbot/#/builders/68/bu
Revert "[lldb] Make use of Scripted{Python,}Interface for ScriptedThreadPlan (Reland #70392)" (#93153)
Reverts llvm/llvm-project#93149 since it breaks
https://lab.llvm.org/buildbot/#/builders/68/builds/74799
show more ...
|
#
4cc6d0f4 |
| 23-May-2024 |
Med Ismail Bennani <ismail@bennani.ma> |
[lldb] Make use of Scripted{Python,}Interface for ScriptedThreadPlan (Reland #70392) (#93149)
This patch makes ScriptedThreadPlan conforming to the ScriptedInterface
& ScriptedPythonInterface facil
[lldb] Make use of Scripted{Python,}Interface for ScriptedThreadPlan (Reland #70392) (#93149)
This patch makes ScriptedThreadPlan conforming to the ScriptedInterface
& ScriptedPythonInterface facilities by introducing 2
ScriptedThreadPlanInterface & ScriptedThreadPlanPythonInterface classes.
This allows us to get rid of every ScriptedThreadPlan-specific SWIG
method and re-use the same affordances as other scripting offordances,
like Scripted{Process,Thread,Platform} & OperatingSystem.
To do so, this adds new transformer methods for `ThreadPlan`, `Stream` &
`Event`, to allow the bijection between C++ objects and their python
counterparts.
This just re-lands #70392 after fixing test failures.
Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
show more ...
|
Revision tags: llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1 |
|
#
5784bf85 |
| 29-Feb-2024 |
jimingham <jingham@apple.com> |
Fix interactive use of "command script add". (#83350)
There was a think-o in a previous commit that made us only able to
define 1 line commands when using command script add interactively.
There
Fix interactive use of "command script add". (#83350)
There was a think-o in a previous commit that made us only able to
define 1 line commands when using command script add interactively.
There was also no test for this feature, so I fixed the think-o and
added a test.
show more ...
|
Revision tags: llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3 |
|
#
fbce2442 |
| 17-Feb-2024 |
Jonas Devlieghere <jonas@devlieghere.com> |
[lldb] Call Import_AppendInittab before Py_Initialize (#82095)
The Python documentation [1] says that `PyImport_AppendInittab` should
be called before `Py_Initialize()`. Starting with Python 3.12,
[lldb] Call Import_AppendInittab before Py_Initialize (#82095)
The Python documentation [1] says that `PyImport_AppendInittab` should
be called before `Py_Initialize()`. Starting with Python 3.12, this is
enforced with a fatal error:
Fatal Python error: PyImport_AppendInittab: PyImport_AppendInittab()
may not be called after Py_Initialize()
This commit ensures we only modify the table of built-in modules if
Python hasn't been initialized. For Python embedded in LLDB, that means
this happen exactly once, before the first call to `Py_Initialize`,
which becomes a NO-OP after. However, when lldb is imported in an
existing Python interpreter, Python will have already been initialized,
but by definition, the lldb module will already have been loaded, so
it's safe to skip adding it (again).
This fixes #70453.
[1] https://docs.python.org/3.12/c-api/import.html#c.PyImport_AppendInittab
show more ...
|
#
a69ecb24 |
| 13-Feb-2024 |
jimingham <jingham@apple.com> |
Add the ability to define a Python based command that uses CommandObjectParsed (#70734)
This allows you to specify options and arguments and their definitions
and then have lldb handle the completi
Add the ability to define a Python based command that uses CommandObjectParsed (#70734)
This allows you to specify options and arguments and their definitions
and then have lldb handle the completions, help, etc. in the same way
that lldb does for its parsed commands internally.
This feature has some design considerations as well as the code, so I've
also set up an RFC, but I did this one first and will put the RFC
address in here once I've pushed it...
Note, the lldb "ParsedCommand interface" doesn't actually do all the
work that it should. For instance, saying the type of an option that has
a completer doesn't automatically hook up the completer, and ditto for
argument values. We also do almost no work to verify that the arguments
match their definition, or do auto-completion for them. This patch
allows you to make a command that's bug-for-bug compatible with built-in
ones, but I didn't want to stall it on getting the auto-command checking
to work all the way correctly.
As an overall design note, my primary goal here was to make an interface
that worked well in the script language. For that I needed, for
instance, to have a property-based way to get all the option values that
were specified. It was much more convenient to do that by making a
fairly bare-bones C interface to define the options and arguments of a
command, and set their values, and then wrap that in a Python class
(installed along with the other bits of the lldb python module) which
you can then derive from to make your new command. This approach will
also make it easier to experiment.
See the file test_commands.py in the test case for examples of how this
works.
show more ...
|
Revision tags: llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1 |
|
#
61384850 |
| 29-Jan-2024 |
Jason Molenda <jason@molenda.com> |
Revert "[lldb] Make use of Scripted{Python,}Interface for ScriptedThreadPlan (#70392)"
Temporarily revert to unblock the CI bots, this is breaking the -DLLVM_ENABLE_MODULES=On modules style build.
Revert "[lldb] Make use of Scripted{Python,}Interface for ScriptedThreadPlan (#70392)"
Temporarily revert to unblock the CI bots, this is breaking the -DLLVM_ENABLE_MODULES=On modules style build. I've notified Ismail.
This reverts commit 888501bc631c4f6d373b4081ff6c504a1ce4a682.
show more ...
|
#
888501bc |
| 29-Jan-2024 |
Med Ismail Bennani <ismail@bennani.ma> |
[lldb] Make use of Scripted{Python,}Interface for ScriptedThreadPlan (#70392)
This patch makes ScriptedThreadPlan conforming to the ScriptedInterface & ScriptedPythonInterface facilities by introduc
[lldb] Make use of Scripted{Python,}Interface for ScriptedThreadPlan (#70392)
This patch makes ScriptedThreadPlan conforming to the ScriptedInterface & ScriptedPythonInterface facilities by introducing 2 ScriptedThreadPlanInterface & ScriptedThreadPlanPythonInterface classes.
This allows us to get rid of every ScriptedThreadPlan-specific SWIG method and re-use the same affordances as other scripting offordances, like Scripted{Process,Thread,Platform} & OperatingSystem.
To do so, this adds new transformer methods for `ThreadPlan`, `Stream` & `Event`, to allow the bijection between C++ objects and their python counterparts.
Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
show more ...
|
Revision tags: llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5 |
|
#
79914122 |
| 07-Nov-2023 |
Med Ismail Bennani <ismail@bennani.ma> |
[lldb/Interpreter] Make Scripted*Interface base class abstract (#71465)
This patch makes the various Scripted Interface base class abstract by
making the `CreatePluginObject` method pure virtual.
[lldb/Interpreter] Make Scripted*Interface base class abstract (#71465)
This patch makes the various Scripted Interface base class abstract by
making the `CreatePluginObject` method pure virtual.
This means that we cannot construct a Scripted Interface base class
instance, so this patch also updates the various
`ScriptedInterpreter::CreateScripted*Interface` methods to return a
`nullptr` instead.`
This patch also removes the `ScriptedPlatformInterface` member from the
`ScriptInterpreter` class since it the interpreter can be owned by the
`ScriptedPlatform` instance itself, like we do for `ScriptedProcess`
objects.
Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
show more ...
|
Revision tags: llvmorg-17.0.4 |
|
#
6eafe2cb |
| 31-Oct-2023 |
Med Ismail Bennani <ismail@bennani.ma> |
Revert "[lldb] Make use of Scripted{Python,}Interface for ScriptedThreadPlan (#70392)"
This reverts commit 4b3cd379cce3f455bf3c8677ca7a5be6e708a4ce since it introduces some test failures:
https://l
Revert "[lldb] Make use of Scripted{Python,}Interface for ScriptedThreadPlan (#70392)"
This reverts commit 4b3cd379cce3f455bf3c8677ca7a5be6e708a4ce since it introduces some test failures:
https://lab.llvm.org/buildbot/#/builders/68/builds/62556
show more ...
|
#
4b3cd379 |
| 30-Oct-2023 |
Med Ismail Bennani <ismail@bennani.ma> |
[lldb] Make use of Scripted{Python,}Interface for ScriptedThreadPlan (#70392)
This patch makes ScriptedThreadPlan conforming to the ScriptedInterface
& ScriptedPythonInterface facilities by introdu
[lldb] Make use of Scripted{Python,}Interface for ScriptedThreadPlan (#70392)
This patch makes ScriptedThreadPlan conforming to the ScriptedInterface
& ScriptedPythonInterface facilities by introducing 2
ScriptedThreadPlanInterface & ScriptedThreadPlanPythonInterface classes.
This allows us to get rid of every ScriptedThreadPlan-specific SWIG
method and re-use the same affordances as other scripting offordances,
like Scripted{Process,Thread,Platform} & OperatingSystem.
To do so, this adds new transformer methods for `ThreadPlan`, `Stream` &
`Event`, to allow the bijection between C++ objects and their python
counterparts.
Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
show more ...
|
#
8a786be3 |
| 30-Oct-2023 |
Med Ismail Bennani <ismail@bennani.ma> |
[lldb] Fix misleading indentiation warning in ScriptInterpreterPython (NFC) (#70732)
This should silence the "misleading indentiation" warnings introduced by
b2929be, by adding an no-op if-statemen
[lldb] Fix misleading indentiation warning in ScriptInterpreterPython (NFC) (#70732)
This should silence the "misleading indentiation" warnings introduced by
b2929be, by adding an no-op if-statement, if the surrounding
if-statement have been compiled out.
Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
show more ...
|
#
b2929beb |
| 30-Oct-2023 |
Tulio Magno Quites Machado Filho <tuliom@redhat.com> |
[lldb] Adapt code to Python 3.13 (#70445)
1. Remove usage of PyEval_ThreadsInitialized and PyEval_InitThreads
Both of these functions were removed in Python 3.13 [1] after being
deprecated since
[lldb] Adapt code to Python 3.13 (#70445)
1. Remove usage of PyEval_ThreadsInitialized and PyEval_InitThreads
Both of these functions were removed in Python 3.13 [1] after being
deprecated since Python 3.9.
According to "What's new in Python 3.13" document [1]:
Since Python 3.7, Py_Initialize() always creates the GIL: calling
PyEval_InitThreads() did nothing and PyEval_ThreadsInitialized()
always returned non-zero.
2. Replace _Py_IsFinalizing() with Py_IsFinalizing().
[1] https://docs.python.org/3.13/whatsnew/3.13.html
show more ...
|