forked from qt-creator/qt-creator
Debugger: Fix LLDB/Python startup for Android
Uses the right python version and connects. but the device side keeps saying "Waiting for Debugger". Change-Id: I0bc9dadfa9e12831006cd486984bc29e197d7fbd Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -213,7 +213,15 @@ void LldbEngine::setupEngine()
|
|||||||
showMessage("STARTING LLDB: " + lldbCmd.toUserOutput());
|
showMessage("STARTING LLDB: " + lldbCmd.toUserOutput());
|
||||||
Environment environment = runParameters().debugger.environment;
|
Environment environment = runParameters().debugger.environment;
|
||||||
environment.appendOrSet("PYTHONUNBUFFERED", "1"); // avoid flushing problem on macOS
|
environment.appendOrSet("PYTHONUNBUFFERED", "1"); // avoid flushing problem on macOS
|
||||||
|
if (lldbCmd.path().contains("/ndk-bundle/")) {
|
||||||
|
FilePath androidPythonDir = lldbCmd.parentDir().parentDir().pathAppended("python3");
|
||||||
|
if (HostOsInfo::isAnyUnixHost())
|
||||||
|
androidPythonDir = androidPythonDir.pathAppended("bin");
|
||||||
|
if (androidPythonDir.exists())
|
||||||
|
environment.prependOrSetPath(androidPythonDir.path());
|
||||||
|
}
|
||||||
m_lldbProc.setEnvironment(environment);
|
m_lldbProc.setEnvironment(environment);
|
||||||
|
|
||||||
if (runParameters().debugger.workingDirectory.isDir())
|
if (runParameters().debugger.workingDirectory.isDir())
|
||||||
m_lldbProc.setWorkingDirectory(runParameters().debugger.workingDirectory);
|
m_lldbProc.setWorkingDirectory(runParameters().debugger.workingDirectory);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user