forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.13' into master
Conflicts: cmake/QtCreatorIDEBranding.cmake qbs/modules/qtc/qtc.qbs qtcreator_ide_branding.pri src/plugins/cmakeprojectmanager/cmakebuildstep.cpp src/plugins/cmakeprojectmanager/cmakebuildstep.h tests/auto/debugger/tst_namedemangler.cpp tests/auto/qml/codemodel/check/tst_check.cpp Change-Id: Iefd5f71c03c0078513b76a92af764a4fb22ee4c2
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include <debugger/debuggerkitinformation.h>
|
||||
#include <debugger/debuggerrunconfigurationaspect.h>
|
||||
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/environmentaspect.h>
|
||||
#include <projectexplorer/runconfigurationaspects.h>
|
||||
#include <projectexplorer/runcontrol.h>
|
||||
@@ -127,21 +128,23 @@ static void findProcessPID(QFutureInterface<qint64> &fi, QStringList selector,
|
||||
if (packageName.isEmpty())
|
||||
return;
|
||||
|
||||
QStringList args = {selector};
|
||||
FilePath adbPath = AndroidConfigurations::currentConfig().adbToolPath();
|
||||
args.append("shell");
|
||||
args.append(preNougat ? pidScriptPreNougat : pidScript.arg(packageName));
|
||||
|
||||
qint64 processPID = -1;
|
||||
chrono::high_resolution_clock::time_point start = chrono::high_resolution_clock::now();
|
||||
do {
|
||||
QThread::msleep(200);
|
||||
FilePath adbPath = AndroidConfigurations::currentConfig().adbToolPath();
|
||||
selector.append("shell");
|
||||
selector.append(preNougat ? pidScriptPreNougat : pidScript.arg(packageName));
|
||||
const auto out = SynchronousProcess().runBlocking({adbPath, selector}).allRawOutput();
|
||||
const auto out = SynchronousProcess().runBlocking({adbPath, args}).allRawOutput();
|
||||
if (preNougat) {
|
||||
processPID = extractPID(out, packageName);
|
||||
} else {
|
||||
if (!out.isEmpty())
|
||||
processPID = out.trimmed().toLongLong();
|
||||
}
|
||||
} while (processPID == -1 && !isTimedOut(start) && !fi.isCanceled());
|
||||
} while ((processPID == -1 || processPID == 0) && !isTimedOut(start) && !fi.isCanceled());
|
||||
|
||||
qCDebug(androidRunWorkerLog) << "PID found:" << processPID << ", PreNougat:" << preNougat;
|
||||
if (!fi.isCanceled())
|
||||
@@ -162,32 +165,32 @@ static void deleter(QProcess *p)
|
||||
|
||||
static QString gdbServerArch(const QString &androidAbi)
|
||||
{
|
||||
if (androidAbi == "arm64-v8a")
|
||||
if (androidAbi == ProjectExplorer::Constants::ANDROID_ABI_ARM64_V8A)
|
||||
return QString("arm64");
|
||||
if (androidAbi == "armeabi-v7a")
|
||||
if (androidAbi == ProjectExplorer::Constants::ANDROID_ABI_ARMEABI_V7A)
|
||||
return QString("arm");
|
||||
// That's correct for "x86_64" and "x86", and best guess at anything that will evolve:
|
||||
// That's correct for x86_64 and x86, and best guess at anything that will evolve:
|
||||
return androidAbi;
|
||||
}
|
||||
|
||||
static QString lldbServerArch(const QString &androidAbi)
|
||||
{
|
||||
if (androidAbi == "armeabi-v7a")
|
||||
return QString("armeabi");
|
||||
// Correct for arm64-v8a "x86_64" and "x86", and best guess at anything that will evolve:
|
||||
if (androidAbi == ProjectExplorer::Constants::ANDROID_ABI_ARMEABI_V7A)
|
||||
return {ProjectExplorer::Constants::ANDROID_ABI_ARMEABI};
|
||||
// Correct for arm64-v8a, x86 and x86_64, and best guess at anything that will evolve:
|
||||
return androidAbi; // arm64-v8a, x86, x86_64
|
||||
}
|
||||
|
||||
static QString lldbServerArch2(const QString &androidAbi)
|
||||
{
|
||||
if (androidAbi == "armeabi-v7a")
|
||||
if (androidAbi == ProjectExplorer::Constants::ANDROID_ABI_ARMEABI_V7A)
|
||||
return {"arm"};
|
||||
if (androidAbi == "x86")
|
||||
if (androidAbi == ProjectExplorer::Constants::ANDROID_ABI_X86)
|
||||
return {"i386"};
|
||||
if (androidAbi == "arm64-v8a")
|
||||
if (androidAbi == ProjectExplorer::Constants::ANDROID_ABI_ARM64_V8A)
|
||||
return {"aarch64"};
|
||||
// Correct for "x86_64" a and best guess at anything that will evolve:
|
||||
return androidAbi; // arm64-v8a
|
||||
// Correct for x86_64 and best guess at anything that will evolve:
|
||||
return androidAbi; // x86_64
|
||||
}
|
||||
|
||||
static FilePath debugServer(bool useLldb, const Target *target)
|
||||
|
||||
Reference in New Issue
Block a user