Commit 1827688d authored by hjk's avatar hjk

Debugger: Use symbolFile for binary validation

In remote setups this is typically a local copy of the executable.

Change-Id: I2c4e38559245e7b2cb4a609b93d80fde2b999cec
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@theqtcompany.com>
parent e3155cd0
......@@ -1828,8 +1828,11 @@ void DebuggerEngine::validateExecutable(DebuggerRunParameters *sp)
return;
if (sp->languages == QmlLanguage)
return;
QString binary = sp->inferior.executable;
if (binary.isEmpty())
QString symbolFile = sp->symbolFile;
if (symbolFile.isEmpty())
symbolFile = sp->inferior.executable;
if (symbolFile.isEmpty())
return;
const bool warnOnRelease = boolSetting(WarnOnReleaseBuilds);
......@@ -1845,11 +1848,11 @@ void DebuggerEngine::validateExecutable(DebuggerRunParameters *sp)
"experience for this binary format.");
return;
} else if (warnOnRelease) {
if (!binary.endsWith(QLatin1String(".exe"), Qt::CaseInsensitive))
binary.append(QLatin1String(".exe"));
if (!symbolFile.endsWith(QLatin1String(".exe"), Qt::CaseInsensitive))
symbolFile.append(QLatin1String(".exe"));
QString errorMessage;
QStringList rc;
if (getPDBFiles(binary, &rc, &errorMessage) && !rc.isEmpty())
if (getPDBFiles(symbolFile, &rc, &errorMessage) && !rc.isEmpty())
return;
if (!errorMessage.isEmpty()) {
detailedWarning.append(QLatin1Char('\n'));
......@@ -1870,11 +1873,11 @@ void DebuggerEngine::validateExecutable(DebuggerRunParameters *sp)
return;
}
Utils::ElfReader reader(binary);
Utils::ElfReader reader(symbolFile);
Utils::ElfData elfData = reader.readHeaders();
QString error = reader.errorString();
Internal::showMessage(_("EXAMINING ") + binary, LogDebug);
Internal::showMessage(_("EXAMINING ") + symbolFile, LogDebug);
QByteArray msg = "ELF SECTIONS: ";
static QList<QByteArray> interesting;
......
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