diff options
author | jimingham <jingham@apple.com> | 2025-04-01 09:54:06 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-01 09:54:06 -0700 |
commit | 347c5a7af5adfe81b79dd77f7f88c626b09e8534 (patch) | |
tree | 255a19d32683aa0dac7061db4919b9cc21c2edff /lldb/source/Interpreter/ScriptInterpreter.cpp | |
parent | ec290a43f68b469197abce65949fde84ecdc9146 (diff) | |
download | llvm-347c5a7af5adfe81b79dd77f7f88c626b09e8534.zip llvm-347c5a7af5adfe81b79dd77f7f88c626b09e8534.tar.gz llvm-347c5a7af5adfe81b79dd77f7f88c626b09e8534.tar.bz2 |
Add a new affordance that the Python module in a dSYM (#133290)
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.
Diffstat (limited to 'lldb/source/Interpreter/ScriptInterpreter.cpp')
-rw-r--r-- | lldb/source/Interpreter/ScriptInterpreter.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lldb/source/Interpreter/ScriptInterpreter.cpp b/lldb/source/Interpreter/ScriptInterpreter.cpp index 4424b6c..63655cc5 100644 --- a/lldb/source/Interpreter/ScriptInterpreter.cpp +++ b/lldb/source/Interpreter/ScriptInterpreter.cpp @@ -48,11 +48,10 @@ StructuredData::DictionarySP ScriptInterpreter::GetInterpreterInfo() { return nullptr; } -bool ScriptInterpreter::LoadScriptingModule(const char *filename, - const LoadScriptOptions &options, - lldb_private::Status &error, - StructuredData::ObjectSP *module_sp, - FileSpec extra_search_dir) { +bool ScriptInterpreter::LoadScriptingModule( + const char *filename, const LoadScriptOptions &options, + lldb_private::Status &error, StructuredData::ObjectSP *module_sp, + FileSpec extra_search_dir, lldb::TargetSP loaded_into_target_sp) { error = Status::FromErrorString( "This script interpreter does not support importing modules."); return false; |