forked from qt-creator/qt-creator
Fix debug on Android 6+ with NDK r11+
Task-number: QTCREATORBUG-16721 Change-Id: Ic65f13076794b75d6e4551b68d26fd3752f82098 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -86,6 +86,15 @@ static QStringList uniquePaths(const QStringList &files)
|
||||
return paths.toList();
|
||||
}
|
||||
|
||||
static QString toNdkArch(const QString &arch)
|
||||
{
|
||||
if (arch == QLatin1String("armeabi-v7a") || arch == QLatin1String("armeabi"))
|
||||
return QLatin1String("arch-arm");
|
||||
if (arch == QLatin1String("arm64-v8a"))
|
||||
return QLatin1String("arch-arm64");
|
||||
return QLatin1String("arch-") + arch;
|
||||
}
|
||||
|
||||
RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration *runConfig, QString *errorMessage)
|
||||
{
|
||||
Target *target = runConfig->target();
|
||||
@@ -109,6 +118,9 @@ RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration *
|
||||
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(kit);
|
||||
params.solibSearchPath.append(qtSoPaths(version));
|
||||
params.solibSearchPath.append(uniquePaths(AndroidManager::androidQtSupport(target)->androidExtraLibs(target)));
|
||||
params.sysRoot = AndroidConfigurations::currentConfig().ndkLocation().appendPath(QLatin1String("platforms"))
|
||||
.appendPath(QLatin1String("android-") + QString::number(AndroidManager::minimumSDK(target)))
|
||||
.appendPath(toNdkArch(AndroidManager::targetArch(target))).toString();
|
||||
}
|
||||
if (aspect->useQmlDebugger()) {
|
||||
QTcpServer server;
|
||||
|
@@ -97,7 +97,6 @@ public:
|
||||
QStringList debugSourceLocation; // Gdb "directory"
|
||||
QString serverStartScript;
|
||||
ProjectExplorer::IDevice::ConstPtr device;
|
||||
QString sysRoot;
|
||||
bool isSnapshot = false; // Set if created internally.
|
||||
ProjectExplorer::Abi toolChainAbi;
|
||||
|
||||
|
@@ -384,7 +384,8 @@ static DebuggerRunControl *doCreate(DebuggerRunParameters rp, RunConfiguration *
|
||||
rp.nativeMixedEnabled = bool(nativeMixedOverride);
|
||||
|
||||
rp.cppEngineType = DebuggerKitInformation::engineType(kit);
|
||||
rp.sysRoot = SysRootKitInformation::sysRoot(kit).toString();
|
||||
if (rp.sysRoot.isEmpty())
|
||||
rp.sysRoot = SysRootKitInformation::sysRoot(kit).toString();
|
||||
rp.debuggerCommand = DebuggerKitInformation::debuggerCommand(kit).toString();
|
||||
rp.device = DeviceKitInformation::device(kit);
|
||||
|
||||
|
@@ -110,6 +110,7 @@ public:
|
||||
QString platform;
|
||||
QString deviceSymbolsRoot;
|
||||
bool continueAfterAttach = false;
|
||||
QString sysRoot;
|
||||
};
|
||||
|
||||
} // namespace Debugger
|
||||
|
Reference in New Issue
Block a user