-
Notifications
You must be signed in to change notification settings - Fork 339
Add a new affordance that the Python module in a dSYM #10462
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
Add a new affordance that the Python module in a dSYM #10462
Conversation
So the dSYM can be told what target it has been loaded into. When lldb is loading modules, while creating a target, it will run "command script import" on any Python modules in Resources/Python in the dSYM. However, this happens WHILE the target is being created, so it is not yet in the target list. That means that these scripts can't act on the target that they a part of when they get loaded. This patch adds a new python API that lldb will call: __lldb_module_added_to_target if it is defined in the module, passing in the Target the module was being added to, so that code in these dSYM's don't have to guess. (cherry picked from commit 347c5a7)
Update the ScriptInterpreterLua::LoadScriptingModule signature after the TargetSP argument was added in llvm#133290. (cherry picked from commit 28b300d)
This is a cherry-pick of my original patch, plus Jonas' fix for the Lua build. |
@swift-ci test |
I have to update the static bindings. I take back everything I ever said publicly about the static bindings being a good solution for anything... |
Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
@swift-ci test |
I think I had bad luck. The Linux test passed. The Windows test just got some timeout, but not in the test that I added which is the only place the new code is currently exercised, and the MacOS test failed in TestDataFormatters.py which also has no intersection with this change. |
@swift-ci please test |
so the dSYM can be told what target it has been loaded into.
When lldb is loading modules, while creating a target, it will run
"command script import" on any Python modules in Resources/Python in the
dSYM. However, this happens WHILE the target is being created, so it is
not yet in the target list. That means that these scripts can't act on
the target that they a part of when they get loaded.
This patch adds a new python API that lldb will call:
if it is defined in the module, passing in the Target the module was
being added to, so that code in these dSYM's don't have to guess.