summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2025-11-17 10:56:28 -0800
committerGitHub <noreply@github.com>2025-11-17 10:56:28 -0800
commit18b5e2a7266bfe8f211be7ae1198e6bed4ab0c06 (patch)
treebaaf5dc34565a90e38265ca7d25d3e975e58418c /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
parentadeedad449d19087baa5ec4fbc246d1f6664b7d4 (diff)
[lldb] Push down the SWIG module to avoid an import cycle (#166265)
This is a reland of #129135 (by dingxiangfei2009) with Vladislav (dzhidzhoev) fix on top. Fixes #92603
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
index 3493fa9fef63..35a772c1454d 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
@@ -272,6 +272,7 @@ void ScriptInterpreterPython::SharedLibraryDirectoryHelper(
// does.
if (this_file.GetFileNameExtension() == ".pyd") {
this_file.RemoveLastPathComponent(); // _lldb.pyd or _lldb_d.pyd
+ this_file.RemoveLastPathComponent(); // native
this_file.RemoveLastPathComponent(); // lldb
llvm::StringRef libdir = LLDB_PYTHON_RELATIVE_LIBDIR;
for (auto it = llvm::sys::path::begin(libdir),