forked from qt-creator/qt-creator
Fix debugger path
Always use the full path to avoid spurious warnings about the debugger being missing. Change-Id: I8ffe768f71fa89327f711752d6339ab969a8d34e Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
@@ -148,16 +148,21 @@ QVariant DebuggerProfileInformation::defaultValue(ProjectExplorer::Profile *p) c
|
|||||||
return (abi.wordWidth() == 32) ? cdbs.first : cdbs.second;
|
return (abi.wordWidth() == 32) ? cdbs.first : cdbs.second;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check suggestions from the SDK:
|
// fall back to system GDB:
|
||||||
|
QString debugger = QLatin1String("gdb");
|
||||||
if (tc) {
|
if (tc) {
|
||||||
|
// Check suggestions from the SDK:
|
||||||
const QString path = tc->suggestedDebugger().toString();
|
const QString path = tc->suggestedDebugger().toString();
|
||||||
if (!path.isEmpty())
|
if (!path.isEmpty()) {
|
||||||
return path;
|
QFileInfo fi(path);
|
||||||
|
if (fi.isAbsolute())
|
||||||
|
return path;
|
||||||
|
debugger = path;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// fall back to system GDB:
|
|
||||||
Utils::Environment env = Utils::Environment::systemEnvironment();
|
Utils::Environment env = Utils::Environment::systemEnvironment();
|
||||||
return env.searchInPath(QLatin1String("gdb"));
|
return env.searchInPath(debugger);
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<ProjectExplorer::Task> DebuggerProfileInformation::validate(ProjectExplorer::Profile *p) const
|
QList<ProjectExplorer::Task> DebuggerProfileInformation::validate(ProjectExplorer::Profile *p) const
|
||||||
|
Reference in New Issue
Block a user