Commit 2564231f authored by Fawzi Mohamed's avatar Fawzi Mohamed
Browse files

ios: warn if debugging in without dSYM might have issues



Task-number: QTCREATORBUG-11580
Change-Id: I97609d658a2da22fc47a499b28bbcde06a7d78f7
Reviewed-by: default avatarFawzi Mohamed <fawzi.mohamed@digia.com>
parent cbe8740a
......@@ -50,6 +50,7 @@
#include <QDir>
#include <QTcpServer>
#include <QSettings>
#include <stdio.h>
#include <fcntl.h>
......@@ -129,6 +130,34 @@ RunControl *IosDebugSupport::createDebugRunControl(IosRunConfiguration *runConfi
params.toolChainAbi = tc->targetAbi();
params.executable = runConfig->exePath().toString();
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) {
params.languages |= QmlLanguage;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment