diff --git a/src/plugins/debugger/cdb/cdbcom.h b/src/plugins/debugger/cdb/cdbcom.h
index 5459d6a7deae7b50aecb1e35511d83eb357d23ff..d11bcf10a34afe8b456f791fb91b07388bd37e07 100644
--- a/src/plugins/debugger/cdb/cdbcom.h
+++ b/src/plugins/debugger/cdb/cdbcom.h
@@ -30,7 +30,9 @@
 #ifndef CDBCOM_H
 #define CDBCOM_H
 
-#ifdef Q_OS_WINDOWS
+#include <QtCore/QtGlobal>
+
+#ifdef Q_OS_WIN
 
 #include <windows.h>
 #include <inc/dbgeng.h>
@@ -50,6 +52,6 @@ typedef IDebugBreakpoint2      CIDebugBreakpoint;
 
 #include "cdbcomstub.h"
 
-#endif // Q_OS_WINDOWS
+#endif // Q_OS_WIN
 
 #endif // CDBCOM_H
diff --git a/src/plugins/debugger/cdb/cdbdebugengine.cpp b/src/plugins/debugger/cdb/cdbdebugengine.cpp
index e6e2c523365ceb127a9d62e48a9f3afc3c3c3e42..ae0dbceab277bf203ad059352f95866feb187201 100644
--- a/src/plugins/debugger/cdb/cdbdebugengine.cpp
+++ b/src/plugins/debugger/cdb/cdbdebugengine.cpp
@@ -388,9 +388,9 @@ void CdbDebugEngine::startupChecks()
 
 void CdbDebugEngine::startDebugger(const DebuggerRunControl *runControl)
 {
-    DebuggerStartParameters *sp = &runControl->sp();
+    const DebuggerStartParameters &sp = runControl->sp();
     if (debugCDBExecution)
-        qDebug() << "startDebugger" << *sp;
+        qDebug() << "startDebugger";
     CdbCore::BreakPoint::clearNormalizeFileNameCache();
     startupChecks();
     setState(AdapterStarting, Q_FUNC_INFO, __LINE__);
@@ -401,7 +401,7 @@ void CdbDebugEngine::startDebugger(const DebuggerRunControl *runControl)
         emit startFailed();
         return;
     }
-    switch (sp->startMode) {
+    switch (sp.startMode) {
     case AttachCore:
     case AttachToRemote:
         warning(QLatin1String("Internal error: Mode not supported."));
@@ -411,7 +411,7 @@ void CdbDebugEngine::startDebugger(const DebuggerRunControl *runControl)
     default:
         break;
     }
-    m_d->m_mode = sp->startMode;
+    m_d->m_mode = sp.startMode;
     m_d->clearDisplay();
     m_d->m_inferiorStartupComplete = false;
     setState(AdapterStarted, Q_FUNC_INFO, __LINE__);
@@ -448,28 +448,28 @@ void CdbDebugEngine::startDebugger(const DebuggerRunControl *runControl)
     switch (m_d->m_mode) {
     case AttachExternal:
     case AttachCrashedExternal:
-        rc = startAttachDebugger(sp->attachPID, m_d->m_mode, &errorMessage);
+        rc = startAttachDebugger(sp.attachPID, m_d->m_mode, &errorMessage);
         needWatchTimer = true; // Fetch away module load, etc. even if crashed
         break;
     case StartInternal:
     case StartExternal:
-        if (sp->useTerminal) {
+        if (sp.useTerminal) {
             // Attaching to console processes triggers an initial breakpoint, which we do not want
             m_d->m_ignoreInitialBreakPoint = true;
             // Launch console stub and wait for its startup
             m_d->m_consoleStubProc.stop(); // We leave the console open, so recycle it now.
-            m_d->m_consoleStubProc.setWorkingDirectory(sp->workingDirectory);
-            m_d->m_consoleStubProc.setEnvironment(sp->environment);
-            rc = m_d->m_consoleStubProc.start(sp->executable, sp->processArgs);
+            m_d->m_consoleStubProc.setWorkingDirectory(sp.workingDirectory);
+            m_d->m_consoleStubProc.setEnvironment(sp.environment);
+            rc = m_d->m_consoleStubProc.start(sp.executable, sp.processArgs);
             if (!rc)
-                errorMessage = tr("The console stub process was unable to start '%1'.").arg(sp->executable);
+                errorMessage = tr("The console stub process was unable to start '%1'.").arg(sp.executable);
             // continues in slotConsoleStubStarted()...
         } else {
             needWatchTimer = true;
-            rc = m_d->startDebuggerWithExecutable(sp->workingDirectory,
-                                                  sp->executable,
-                                                  sp->processArgs,
-                                                  sp->environment,
+            rc = m_d->startDebuggerWithExecutable(sp.workingDirectory,
+                                                  sp.executable,
+                                                  sp.processArgs,
+                                                  sp.environment,
                                                   &errorMessage);
         }
         break;
@@ -525,7 +525,7 @@ void CdbDebugEnginePrivate::processCreatedAttached(ULONG64 processHandle, ULONG6
     // the exception to be delivered to the debugger
     // Also, see special handling in slotModulesLoaded().
     if (m_mode == AttachCrashedExternal) {
-        const QString crashParameter = manager()->startParameters()->crashParameter;
+        const QString crashParameter = manager()->runControl()->sp().crashParameter;
         if (!crashParameter.isEmpty()) {
             ULONG64 evtNr = crashParameter.toULongLong();
             const HRESULT hr = interfaces().debugControl->SetNotifyEventHandle(evtNr);
diff --git a/src/plugins/debugger/debuggermanager.h b/src/plugins/debugger/debuggermanager.h
index 8011a65902da9ef5cd48b4de35333480f184cdf1..f4e919b1f6d79ab812872b6ca52caf64900d8896 100644
--- a/src/plugins/debugger/debuggermanager.h
+++ b/src/plugins/debugger/debuggermanager.h
@@ -321,7 +321,7 @@ signals:
 
 private:
     void init();
-    void runTest(const QString &fileName);
+    // void runTest(const QString &fileName);
     Q_SLOT void createNewDock(QWidget *widget);
 
     void aboutToShutdown();
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index 4a7c8dc43e5f2f4f076bd75b4a0d2812f14cf66d..01b646c7a3768cf11a09968a7cd87ceb9b43f039 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -1060,8 +1060,8 @@ void DebuggerPlugin::extensionsInitialized()
     // time gdb -i mi -ex 'debuggerplugin.cpp:800' -ex r -ex q bin/qtcreator.bin
     const QByteArray env = qgetenv("QTC_DEBUGGER_TEST");
     //qDebug() << "EXTENSIONS INITIALIZED:" << env;
-    if (!env.isEmpty())
-        m_manager->runTest(QString::fromLocal8Bit(env));
+    // if (!env.isEmpty())
+    //    m_manager->runTest(QString::fromLocal8Bit(env));
     if (m_attachRemoteParameters.attachPid || !m_attachRemoteParameters.attachCore.isEmpty())
         QTimer::singleShot(0, this, SLOT(attachCmdLine()));
 
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index 091821f8fccaf3bd4b387eba97f17511aec7785c..eea23c123cb465b00572a51bce3a39d3871de51e 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -976,7 +976,7 @@ void GdbEngine::handleResultRecord(GdbResponse *response)
                                   GdbResultDone)) {
 #ifdef Q_OS_WIN
         // Ignore spurious 'running' responses to 'attach'
-        const bool warning = !(m_startParameters->startMode == AttachExternal
+        const bool warning = !(manager()->runControl()->sp().startMode == AttachExternal
                                && cmd.command.startsWith("attach"));
 #else
         const bool warning = true;