forked from qt-creator/qt-creator
HostOsInfo: Add some more useful abstractions.
Namely: - path list separator - executable suffix - file name case sensitivity All of these are duplicated in various places in the current Creator code. Change-Id: I86eb4662fa3c2071759bd728cae1aaf7111ae686 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
@@ -4982,15 +4982,17 @@ void GdbEngine::finishInferiorSetup()
|
||||
|
||||
void GdbEngine::handleDebugInfoLocation(const GdbResponse &response)
|
||||
{
|
||||
const char pathSep = HostOsInfo::isWindowsHost() ? ';' : ':';
|
||||
if (response.resultClass == GdbResultDone) {
|
||||
const QByteArray debugInfoLocation = startParameters().debugInfoLocation.toLocal8Bit();
|
||||
if (QFile::exists(QString::fromLocal8Bit(debugInfoLocation))) {
|
||||
const QByteArray curDebugInfoLocations = response.consoleStreamOutput.split('"').value(1);
|
||||
if (curDebugInfoLocations.isEmpty())
|
||||
if (curDebugInfoLocations.isEmpty()) {
|
||||
postCommand("set debug-file-directory " + debugInfoLocation);
|
||||
else
|
||||
postCommand("set debug-file-directory " + debugInfoLocation + pathSep + curDebugInfoLocations);
|
||||
} else {
|
||||
postCommand("set debug-file-directory " + debugInfoLocation
|
||||
+ HostOsInfo::pathListSeparator().toLatin1()
|
||||
+ curDebugInfoLocations);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user