diff --git a/src/plugins/debugger/gdb/tcftrkgdbadapter.cpp b/src/plugins/debugger/gdb/tcftrkgdbadapter.cpp index 890b79a13f75daec04d8e10074ad990b2d39885f..2bb863ce5c215175da78bf042949a783765363f9 100644 --- a/src/plugins/debugger/gdb/tcftrkgdbadapter.cpp +++ b/src/plugins/debugger/gdb/tcftrkgdbadapter.cpp @@ -244,7 +244,7 @@ void TcfTrkGdbAdapter::handleTcfTrkRunControlModuleLoadContextSuspendedEvent(con const QByteArray symbolFile = m_symbolFile.toLocal8Bit(); if (symbolFile.isEmpty()) { - logMessage(_("WARNING: No symbol file available."), LogWarning); + logMessage(_("WARNING: No symbol file available."), LogError); } else { // Does not seem to be necessary anymore. // FIXME: Startup sequence can be streamlined now as we do not diff --git a/src/plugins/debugger/gdb/trkgdbadapter.cpp b/src/plugins/debugger/gdb/trkgdbadapter.cpp index 8b235edfae1b4fffd5676a01d61b454b833904a7..b6be4d7ded482e66bcb2f7e9331bd4c431e3512f 100644 --- a/src/plugins/debugger/gdb/trkgdbadapter.cpp +++ b/src/plugins/debugger/gdb/trkgdbadapter.cpp @@ -1651,7 +1651,7 @@ void TrkGdbAdapter::handleCreateProcess(const TrkResult &result) const QByteArray symbolFile = m_symbolFile.toLocal8Bit(); if (symbolFile.isEmpty()) { - logMessage(_("WARNING: No symbol file available."), LogWarning); + logMessage(_("WARNING: No symbol file available."), LogError); } else { // Does not seem to be necessary anymore. // FIXME: Startup sequence can be streamlined now as we do not diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp index 19f823f6b7797eccf40dffe2dce89a4481ce9e39..da304d250fd88b2018f93e534c7ea747643a8f71 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp @@ -275,21 +275,21 @@ QString S60DeviceRunConfiguration::symbianTarget() const return isDebug() ? QLatin1String("udeb") : QLatin1String("urel"); } -QString S60DeviceRunConfiguration::symbianPlatform() const +static inline QString symbianPlatformForToolChain(ProjectExplorer::ToolChainType t) { - const Qt4BuildConfiguration *qt4bc = qt4Target()->activeBuildConfiguration(); - switch (qt4bc->toolChainType()) { + switch (t) { case ProjectExplorer::ToolChain_GCCE: case ProjectExplorer::ToolChain_GCCE_GNUPOC: return QLatin1String("gcce"); case ProjectExplorer::ToolChain_RVCT_ARMV5: return QLatin1String("armv5"); default: // including ProjectExplorer::RVCT_ARMV6_GNUPOC: - return QLatin1String("armv6"); + break; } + return QLatin1String("armv6"); } -/* Grep a package file for the '.exe' file. Curently for use on Linux only +/* Grep a package file for the '.exe' file. Currently for use on Linux only * as the '.pkg'-files on Windows do not contain drive letters, which is not * handled here. \code ; Executable and default resource files @@ -317,29 +317,51 @@ static inline QString executableFromPackageUnix(const QString &packageFileName) return QString(); } -QString S60DeviceRunConfiguration::localExecutableFileName() const +// ABLD/Raptor: Return executable from device/EPOC +static inline QString localExecutableFromDevice(const QtVersion *qtv, + const QString &symbianTarget, /* udeb/urel */ + const QString &targetName, + ProjectExplorer::ToolChainType t) { + QTC_ASSERT(qtv, return QString(); ) + + const S60Devices::Device device = S60Manager::instance()->deviceForQtVersion(qtv); QString localExecutable; - switch (toolChainType()) { + QTextStream(&localExecutable) << device.epocRoot << "/epoc32/release/" + << symbianPlatformForToolChain(t) + << '/' << symbianTarget << '/' << targetName + << ".exe"; + return localExecutable; +} + +QString S60DeviceRunConfiguration::localExecutableFileName() const +{ + const ProjectExplorer::ToolChainType toolChain = toolChainType(); + switch (toolChain) { case ProjectExplorer::ToolChain_GCCE_GNUPOC: case ProjectExplorer::ToolChain_RVCT_ARMV5_GNUPOC: { TargetInformation ti = qt4Target()->qt4Project()->rootProjectNode()->targetInformation(projectFilePath()); if (!ti.valid) return QString(); - localExecutable = executableFromPackageUnix(ti.buildDir + QLatin1Char('/') + ti.target + QLatin1String("_template.pkg")); - } + return executableFromPackageUnix(ti.buildDir + QLatin1Char('/') + ti.target + QLatin1String("_template.pkg")); + } + case ProjectExplorer::ToolChain_RVCT_ARMV5: + case ProjectExplorer::ToolChain_RVCT_ARMV6: + return localExecutableFromDevice(qtVersion(), symbianTarget(), targetName(), toolChain); break; - default: { - const QtVersion *qtv = qtVersion(); - QTC_ASSERT(qtv, return QString()); - const S60Devices::Device device = S60Manager::instance()->deviceForQtVersion(qtv); - QTextStream(&localExecutable) << device.epocRoot << "/epoc32/release/" - << symbianPlatform() << '/' << symbianTarget() << '/' << targetName() - << ".exe"; - } + case ProjectExplorer::ToolChain_GCCE: { + // As of 4.7.1, qmake-gcce-Raptor builds were changed to put all executables into 'armv5' + const QtVersion *qtv = qtVersion(); + QTC_ASSERT(qtv, return QString(); ) + return qtv->isBuildWithSymbianSbsV2() ? + localExecutableFromDevice(qtv, symbianTarget(), targetName(), ProjectExplorer::ToolChain_RVCT_ARMV5) : + localExecutableFromDevice(qtv, symbianTarget(), targetName(), toolChain); + } + break; + default: break; } - return QDir::toNativeSeparators(localExecutable); + return QString(); } quint32 S60DeviceRunConfiguration::executableUid() const @@ -728,6 +750,25 @@ static inline QString localExecutable(const S60DeviceRunConfiguration *rc) return QString(); } +// Return symbol file which should co-exist with the executable. +// location in debug builds. This can be 'foo.sym' (ABLD) or 'foo.exe.sym' (Raptor) +static inline QString symbolFileFromExecutable(const QString &executable) +{ + // 'foo.exe.sym' (Raptor) + const QFileInfo raptorSymFi(executable + QLatin1String(".sym")); + if (raptorSymFi.isFile()) + return raptorSymFi.absoluteFilePath(); + // 'foo.sym' (ABLD) + const int lastDotPos = executable.lastIndexOf(QLatin1Char('.')); + if (lastDotPos != -1) { + const QString symbolFileName = executable.mid(0, lastDotPos) + QLatin1String(".sym"); + const QFileInfo symbolFileNameFi(symbolFileName); + if (symbolFileNameFi.isFile()) + return symbolFileNameFi.absoluteFilePath(); + } + return QString(); +} + // Create start parameters from run configuration Debugger::DebuggerStartParameters S60DeviceDebugRunControl::s60DebuggerStartParams(const S60DeviceRunConfiguration *rc) { @@ -749,15 +790,8 @@ Debugger::DebuggerStartParameters S60DeviceDebugRunControl::s60DebuggerStartPara QTC_ASSERT(sp.executableUid, return sp); // Prefer the '*.sym' file over the '.exe', which should exist at the same - // location in debug builds - const QString localExecutableFileName = localExecutable(rc); - const int lastDotPos = localExecutableFileName.lastIndexOf(QLatin1Char('.')); - if (lastDotPos != -1) { - const QString symbolFileName = localExecutableFileName.mid(0, lastDotPos) + QLatin1String(".sym"); - if (QFileInfo(symbolFileName).isFile()) - sp.symbolFileName = symbolFileName; - } - + // location in debug builds. This can be 'foo.exe' (ABLD) or 'foo.exe.sym' (Raptor) + sp.symbolFileName = symbolFileFromExecutable(localExecutable(rc)); return sp; } diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h index 151ed6748e17a4e7ab9cc240afa57fa12ba13109..56dc41a97c1ce9957f2ba5037462b6f0fbdf860c 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h +++ b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h @@ -90,11 +90,9 @@ public: bool isDebug() const; QString symbianTarget() const; - QString symbianPlatform() const; QVariantMap toMap() const; - signals: void targetInformationChanged();