Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lldb] Make use of Scripted{Python,}Interface for ScriptedThreadPlan #70392

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

medismailben
Copy link
Member

@medismailben medismailben commented Oct 26, 2023

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.

@llvmbot llvmbot added the lldb label Oct 26, 2023
@medismailben medismailben changed the title [lldb/Interpreter] Make ScriptedInterface Object creation more generic [lldb] Make use of Scripted{Python,}Interface for ScriptedThreadPlan Oct 26, 2023
Copy link
Member

@bulbazord bulbazord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think all of my comments have been addressed. Thanks!

Copy link
Member

@JDevlieghere JDevlieghere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a few nits. This looks really great with the new interfaces.

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>
@medismailben medismailben merged commit 4b3cd37 into llvm:main Oct 30, 2023
3 checks passed
medismailben added a commit that referenced this pull request Oct 31, 2023
@medismailben
Copy link
Member Author

This has been reverted in 6eafe2c since it introduced some test failures:


Failed Tests (4):
lldb-api :: functionalities/completion/TestCompletion.py
lldb-api :: functionalities/step_scripted/TestStepScripted.py
lldb-api :: functionalities/thread_plan/TestThreadPlanCommands.py
lldb-shell :: Commands/command-stop-hook-output.test

@DavidSpickett
Copy link
Collaborator

So in case it was confusing, the revert did fix Arm 32 bit linux as well, but it stayed red for other reasons.

Also I looked into it on the same machine and got:

********************
Unresolved Tests (1):
  lldb-api :: functionalities/thread_plan/TestThreadPlanCommands.py

********************
Failed Tests (3):
  lldb-api :: functionalities/completion/TestCompletion.py
  lldb-api :: functionalities/step_scripted/TestStepScripted.py
  lldb-shell :: Commands/command-stop-hook-output.test

Same tests as on x86. One failed with:

FAIL: LLDB (/home/david.spickett/build-arm/bin/clang-arm) :: test_thread_plan_actions (TestThreadPlanCommands.TestThreadPlanCommands)
======================================================================
ERROR: test_thread_plan_actions (TestThreadPlanCommands.TestThreadPlanCommands)
----------------------------------------------------------------------
TypeError: WrapStepOver.__init__() missing 1 required positional argument: 'dict'

And I see that the previous special case Python object maker thingy (can you tell I know nothing about this :) ) did pass on, or make a dict of some sort.

The others seemed to be trying to create a plan, which failed (same reason I expect), then tried to use it which of course failed.

@medismailben
Copy link
Member Author

@DavidSpickett Checking! Thanks for the heads-up.

medismailben added a commit that referenced this pull request Jan 29, 2024
…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>
jasonmolenda added a commit that referenced this pull request Jan 29, 2024
…eadPlan (#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 888501b.
medismailben added a commit to medismailben/llvm-project that referenced this pull request Feb 2, 2024
…lvm#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>
medismailben added a commit to medismailben/llvm-project that referenced this pull request May 23, 2024
…lvm#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>
medismailben added a commit that referenced this pull request May 23, 2024
…(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>
medismailben added a commit to medismailben/llvm-project that referenced this pull request Jun 27, 2024
…lvm#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.

This just re-lands llvm#70392 after fixing test failures.

Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
medismailben added a commit that referenced this pull request Jun 27, 2024
…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>
lravenclaw pushed a commit to lravenclaw/llvm-project that referenced this pull request Jul 3, 2024
…lvm#70392) (llvm#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 llvm#70392 after fixing test failures.

Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
AlexisPerry pushed a commit to llvm-project-tlp/llvm-project that referenced this pull request Jul 9, 2024
…lvm#70392) (llvm#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 llvm#70392 after fixing test failures.

Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants