forked from qt-creator/qt-creator
Executable's UID added to the DebuggerStartParameters. Used for debugging on SymbianOs
This commit is contained in:
@@ -110,7 +110,8 @@ DebuggerStartParameters::DebuggerStartParameters()
|
||||
useTerminal(false),
|
||||
breakAtMain(false),
|
||||
toolChainType(ToolChain::UNKNOWN),
|
||||
startMode(NoStartMode)
|
||||
startMode(NoStartMode),
|
||||
executableUid(0)
|
||||
{}
|
||||
|
||||
void DebuggerStartParameters::clear()
|
||||
|
@@ -99,6 +99,9 @@ public:
|
||||
QString dumperLibrary;
|
||||
QStringList dumperLibraryLocations;
|
||||
DebuggerStartMode startMode;
|
||||
|
||||
// for SymbianOS debugging
|
||||
quint32 executableUid;
|
||||
};
|
||||
|
||||
DEBUGGER_EXPORT QDebug operator<<(QDebug str, const DebuggerStartParameters &);
|
||||
|
@@ -252,6 +252,27 @@ QString S60DeployConfiguration::localExecutableFileName() const
|
||||
return QDir::toNativeSeparators(localExecutable);
|
||||
}
|
||||
|
||||
quint32 S60DeployConfiguration::executableUid() const
|
||||
{
|
||||
quint32 uid = 0;
|
||||
QString executablePath(localExecutableFileName());
|
||||
if (!executablePath.isEmpty()) {
|
||||
QFile file(executablePath);
|
||||
if (file.open(QIODevice::ReadOnly)) {
|
||||
// executable's UID is 4 bytes starting at 8.
|
||||
const QByteArray data = file.read(12);
|
||||
if (data.size() == 12) {
|
||||
const unsigned char *d = reinterpret_cast<const unsigned char*>(data.data() + 8);
|
||||
uid = *d++;
|
||||
uid += *d++ << 8;
|
||||
uid += *d++ << 16;
|
||||
uid += *d++ << 24;
|
||||
}
|
||||
}
|
||||
}
|
||||
return uid;
|
||||
}
|
||||
|
||||
bool S60DeployConfiguration::runSmartInstaller() const
|
||||
{
|
||||
DeployConfiguration *dc = target()->activeDeployConfiguration();
|
||||
|
@@ -77,6 +77,7 @@ public:
|
||||
QStringList packageTemplateFileNames() const;
|
||||
QString appPackageTemplateFileName() const;
|
||||
QString localExecutableFileName() const;
|
||||
quint32 executableUid() const;
|
||||
|
||||
QVariantMap toMap() const;
|
||||
|
||||
|
@@ -593,6 +593,9 @@ S60DeviceDebugRunControl::S60DeviceDebugRunControl(S60DeviceRunConfiguration *rc
|
||||
m_startParams->startMode = Debugger::StartInternal;
|
||||
m_startParams->toolChainType = rc->toolChainType();
|
||||
m_startParams->executable = debugFileName;
|
||||
m_startParams->executableUid = activeDeployConf->executableUid();
|
||||
|
||||
QTC_ASSERT(m_startParams->executableUid, return);
|
||||
|
||||
// Prefer the '*.sym' file over the '.exe', which should exist at the same
|
||||
// location in debug builds
|
||||
|
Reference in New Issue
Block a user