From 4d6ce81e0c3d970301a5a09756de62364ace2347 Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 19 Apr 2013 15:01:55 +0200 Subject: [PATCH] Debugger: Don't scan directories that do not exist. Change-Id: Ie79249039643041fd68da6766b0e6f3ca6080b86 Reviewed-by: hjk --- src/plugins/debugger/debuggerrunner.cpp | 8 +++----- src/plugins/debugger/gdb/gdbengine.cpp | 8 ++++++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/plugins/debugger/debuggerrunner.cpp b/src/plugins/debugger/debuggerrunner.cpp index 55b9d206776..5090f97485e 100644 --- a/src/plugins/debugger/debuggerrunner.cpp +++ b/src/plugins/debugger/debuggerrunner.cpp @@ -472,9 +472,9 @@ DebuggerRunControl *DebuggerRunControlFactory::doCreate (const DebuggerStartParameters &sp0, RunConfiguration *rc, QString *errorMessage) { TaskHub *th = ProjectExplorerPlugin::instance()->taskHub(); - th->clearTasks(Core::Id(Debugger::Constants::TASK_CATEGORY_DEBUGGER_DEBUGINFO)); - th->clearTasks(Core::Id(Debugger::Constants::TASK_CATEGORY_DEBUGGER_TEST)); - th->clearTasks(Core::Id(Debugger::Constants::TASK_CATEGORY_DEBUGGER_RUNTIME)); + th->clearTasks(Debugger::Constants::TASK_CATEGORY_DEBUGGER_DEBUGINFO); + th->clearTasks(Debugger::Constants::TASK_CATEGORY_DEBUGGER_TEST); + th->clearTasks(Debugger::Constants::TASK_CATEGORY_DEBUGGER_RUNTIME); DebuggerStartParameters sp = sp0; if (!debuggerCore()->boolSetting(AutoEnrichParameters)) { @@ -486,8 +486,6 @@ DebuggerRunControl *DebuggerRunControlFactory::doCreate sp.debugSourceLocation.append(base + QLatin1String("qt5base/src/corelib")); sp.debugSourceLocation.append(base + QLatin1String("qt5base/src/gui")); sp.debugSourceLocation.append(base + QLatin1String("qt5base/src/network")); - sp.debugSourceLocation.append(base + QLatin1String("qt5base/src/v8")); - sp.debugSourceLocation.append(base + QLatin1String("qt5declarative/src/qml")); } } diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 7c69f233b29..8145c93f3c4 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -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()) {