From 4aea270790c6eaed818422f6933140d98f604f92 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Sun, 5 Dec 2021 11:47:06 +0100 Subject: [PATCH] Debugger: Set Python env also for ndk-lldbs outside the SDK When using an NDK installation which was not installed via an Android SDK manager, we cannot presume that the included lldb binary has a path containing "ndk" or "ndk-bundle". Looking for "/toolchains/llvm/prebuilt/" in the path should detect any ndk-provided lldb. Change-Id: Icbaab0915f5877ca37ee44cbca6cc37360363b5c Reviewed-by: Christian Stenger --- src/plugins/debugger/debuggeritem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/debugger/debuggeritem.cpp b/src/plugins/debugger/debuggeritem.cpp index 1517557be95..b6060046c7c 100644 --- a/src/plugins/debugger/debuggeritem.cpp +++ b/src/plugins/debugger/debuggeritem.cpp @@ -267,8 +267,8 @@ void DebuggerItem::reinitializeFromFile(const Environment &sysEnv, QString *erro bool DebuggerItem::addAndroidLldbPythonEnv(const Utils::FilePath &lldbCmd, Utils::Environment &env) { - if (lldbCmd.baseName().contains("lldb") && - (lldbCmd.path().contains("/ndk/") || lldbCmd.path().contains("/ndk-bundle/"))) { + if (lldbCmd.baseName().contains("lldb") + && lldbCmd.path().contains("/toolchains/llvm/prebuilt/")) { const FilePath pythonDir = lldbCmd.parentDir().parentDir().pathAppended("python3"); const FilePath pythonBinDir = HostOsInfo::isAnyUnixHost() ? pythonDir.pathAppended("bin") : pythonDir;