Android: Move gdbserver path determination to androidrunnerworker.cpp

That's the only user, and it's easier to extend to handle LLDB there.

Change-Id: I7ce236e2ff509b419d52b10d086a75ff0c2ea14b
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
This commit is contained in:
hjk
2020-04-15 04:56:26 +02:00
parent 6d66733d50
commit 3a1dc3c3ed
3 changed files with 21 additions and 28 deletions

View File

@@ -888,31 +888,6 @@ FilePath AndroidConfig::defaultNdkLocation() const
return sdkLocation().pathAppended(m_defaultSdkDepends.ndkPath);
}
static inline QString gdbServerArch(const QString &androidAbi)
{
if (androidAbi == "arm64-v8a") {
return QString("arm64");
} else if (androidAbi == "armeabi-v7a") {
return QString("arm");
} else if (androidAbi == "x86_64") {
return QString("x86_64");
} else if (androidAbi == "x86") {
return QString("x86");
} else {
return {};
}
}
FilePath AndroidConfig::gdbServer(const QString &androidAbi, const BaseQtVersion *qtVersion) const
{
const FilePath path = AndroidConfigurations::currentConfig().ndkLocation(qtVersion)
.pathAppended(QString("prebuilt/android-%1/gdbserver/gdbserver")
.arg(gdbServerArch(androidAbi)));
if (path.exists())
return path;
return {};
}
QVersionNumber AndroidConfig::ndkVersion(const BaseQtVersion *qtVersion) const
{
return ndkVersion(ndkLocation(qtVersion));