Debugger: Don't scan directories that do not exist.

Change-Id: Ie79249039643041fd68da6766b0e6f3ca6080b86
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
hjk
2013-04-19 15:01:55 +02:00
parent 2d568e79c4
commit 4d6ce81e0c
2 changed files with 9 additions and 7 deletions

View File

@@ -4870,8 +4870,12 @@ void GdbEngine::startGdb(const QStringList &args)
+ " " + it.value().toLocal8Bit());
// Spaces just will not work.
foreach (const QString &src, sp.debugSourceLocation)
postCommand("directory " + src.toLocal8Bit());
foreach (const QString &src, sp.debugSourceLocation) {
if (QDir(src).exists())
postCommand("directory " + src.toLocal8Bit());
else
showMessage(_("# directory does not exist: ") + src, LogInput);
}
const QByteArray sysroot = sp.sysRoot.toLocal8Bit();
if (!sysroot.isEmpty()) {