forked from qt-creator/qt-creator
ios: warn if debugging in without dSYM might have issues
Task-number: QTCREATORBUG-11580 Change-Id: I97609d658a2da22fc47a499b28bbcde06a7d78f7 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
@@ -50,6 +50,7 @@
|
|||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QTcpServer>
|
#include <QTcpServer>
|
||||||
|
#include <QSettings>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
@@ -129,6 +130,34 @@ RunControl *IosDebugSupport::createDebugRunControl(IosRunConfiguration *runConfi
|
|||||||
params.toolChainAbi = tc->targetAbi();
|
params.toolChainAbi = tc->targetAbi();
|
||||||
params.executable = runConfig->exePath().toString();
|
params.executable = runConfig->exePath().toString();
|
||||||
params.remoteChannel = QLatin1String("connect://localhost:0");
|
params.remoteChannel = QLatin1String("connect://localhost:0");
|
||||||
|
|
||||||
|
Utils::FileName xcodeInfo = IosConfigurations::developerPath().parentDir()
|
||||||
|
.appendPath(QLatin1String("Info.plist"));
|
||||||
|
bool buggyLldb = false;
|
||||||
|
if (xcodeInfo.toFileInfo().exists()) {
|
||||||
|
QSettings settings(xcodeInfo.toString(), QSettings::NativeFormat);
|
||||||
|
QStringList version = settings.value(QLatin1String("CFBundleShortVersionString")).toString()
|
||||||
|
.split(QLatin1Char('.'));
|
||||||
|
if (version.value(0).toInt() == 5 && version.value(1, QString::number(1)).toInt() == 0)
|
||||||
|
buggyLldb = true;
|
||||||
|
}
|
||||||
|
QString bundlePath = runConfig->bundleDir().toString();
|
||||||
|
bundlePath.chop(4);
|
||||||
|
Utils::FileName dsymPath = Utils::FileName::fromString(
|
||||||
|
bundlePath.append(QLatin1String(".dSYM")));
|
||||||
|
if (!dsymPath.toFileInfo().exists()) {
|
||||||
|
if (buggyLldb)
|
||||||
|
TaskHub::addTask(Task::Warning,
|
||||||
|
tr("Debugging with Xcode 5.0.x can be unreliable without a dSYM. "
|
||||||
|
"To create one, add a dsymutil deploystep."),
|
||||||
|
ProjectExplorer::Constants::TASK_CATEGORY_DEPLOYMENT);
|
||||||
|
} else if (dsymPath.toFileInfo().lastModified()
|
||||||
|
< QFileInfo(runConfig->localExecutableFilePath()).lastModified()) {
|
||||||
|
TaskHub::addTask(Task::Warning,
|
||||||
|
tr("The dSYM %1 seems to be outdated, it might confuse the debugger.")
|
||||||
|
.arg(dsymPath.toUserOutput()),
|
||||||
|
ProjectExplorer::Constants::TASK_CATEGORY_DEPLOYMENT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (qmlDebug) {
|
if (qmlDebug) {
|
||||||
params.languages |= QmlLanguage;
|
params.languages |= QmlLanguage;
|
||||||
|
|||||||
Reference in New Issue
Block a user