diff --git a/src/plugins/debugger/debuggermanager.cpp b/src/plugins/debugger/debuggermanager.cpp
index 4868cf4c517a536b14839db817445755dd0dfd85..95010977da61f8f4ab4b2a691d832707951bf139 100644
--- a/src/plugins/debugger/debuggermanager.cpp
+++ b/src/plugins/debugger/debuggermanager.cpp
@@ -1079,22 +1079,12 @@ bool DebuggerManager::useCustomDumpers() const
     return m_settings.m_useCustomDumpers;
 }
 
-bool DebuggerManager::useFastStart() const
-{
-    return 0; // && m_settings.m_useFastStart;
-}
-
 void DebuggerManager::setUseCustomDumpers(bool on)
 {
     m_settings.m_useCustomDumpers = on;
     engine()->setUseCustomDumpers(on);
 }
 
-void DebuggerManager::setUseFastStart(bool on)
-{
-    m_settings.m_useFastStart = on;
-}
-
 void DebuggerManager::setDebugDumpers(bool on)
 {
     m_settings.m_debugDumpers = on;
diff --git a/src/plugins/debugger/debuggermanager.h b/src/plugins/debugger/debuggermanager.h
index a43feb7e96c394a1cf73faffe52e2cee3ee56ca5..a3407a0aa59c4f410d3a711929805d872f6d972e 100644
--- a/src/plugins/debugger/debuggermanager.h
+++ b/src/plugins/debugger/debuggermanager.h
@@ -170,7 +170,11 @@ private:
     virtual bool skipKnownFrames() const = 0;
     virtual bool debugDumpers() const = 0;
     virtual bool useCustomDumpers() const = 0;
-    virtual bool useFastStart() const = 0;
+    
+    virtual bool wantsAllPluginBreakpoints() const = 0;
+    virtual bool wantsSelectedPluginBreakpoints() const = 0;
+    virtual bool wantsNoPluginBreakpoints() const = 0;
+    virtual QString selectedPluginBreakpointsPattern() const = 0;
 
     virtual void reloadDisassembler() = 0;
     virtual void reloadModules() = 0;
@@ -288,7 +292,6 @@ public slots:
     void setUseCustomDumpers(bool on);
     void setDebugDumpers(bool on);
     void setSkipKnownFrames(bool on);
-    void setUseFastStart(bool on);
 
 private slots:
     void showDebuggerOutput(const QString &prefix, const QString &msg);
@@ -323,7 +326,14 @@ private:
     bool skipKnownFrames() const;
     bool debugDumpers() const;
     bool useCustomDumpers() const;
-    bool useFastStart() const;
+    bool wantsAllPluginBreakpoints() const
+        { return m_settings.m_pluginAllBreakpoints; }
+    bool wantsSelectedPluginBreakpoints() const
+        { return m_settings.m_pluginSelectedBreakpoints; }
+    bool wantsNoPluginBreakpoints() const
+        { return m_settings.m_pluginNoBreakpoints; }
+    QString selectedPluginBreakpointsPattern() const
+        { return m_settings.m_pluginSelectedBreakpointsPattern; }
 
     void notifyStartupFinished();
     void notifyInferiorStopped();
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index aa3fca911f6ce0cc0b7ed1cfa626d56534485305..18c7e6d0c5637701574e449d0f5ee4d0a07285d0 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -281,6 +281,8 @@ QWidget *GdbOptionPage::createPage(QWidget *parent)
         setChecked(m_settings.m_pluginSelectedBreakpoints);
     m_ui.radioButtonNoPluginBreakpoints->
         setChecked(m_settings.m_pluginNoBreakpoints);
+    m_ui.lineEditSelectedPluginBreakpointsPattern->
+        setText(m_settings.m_pluginSelectedBreakpointsPattern);
     m_ui.lineEditSelectedPluginBreakpointsPattern->
         setEnabled(m_settings.m_pluginSelectedBreakpoints);
 
diff --git a/src/plugins/debugger/gdbengine.cpp b/src/plugins/debugger/gdbengine.cpp
index ad97e748b70d404087974fea49228255869ba1e4..49b76a5e34d8e68ad492b7ab2915c47347dc1ccc 100644
--- a/src/plugins/debugger/gdbengine.cpp
+++ b/src/plugins/debugger/gdbengine.cpp
@@ -254,7 +254,6 @@ void GdbEngine::init()
 {
     m_pendingRequests = 0;
     m_gdbVersion = 100;
-    m_shared = 0;
     m_outputCodec = QTextCodec::codecForLocale();
     m_dataDumperState = DataDumperUninitialized;
 
@@ -988,18 +987,6 @@ void GdbEngine::handleInfoShared(const GdbResultRecord &record)
     if (record.resultClass == GdbResultDone) {
         // let the modules handler do the parsing
         handleModulesList(record);
-        QList<Module> modules = qq->modulesHandler()->modules();
-        bool reloadNeeded = false;
-        foreach (const Module &module, modules) {
-            // FIXME: read this from some list
-            if (!module.symbolsRead && !module.moduleName.contains("Q")) {
-                reloadNeeded = true;
-                sendCommand("sharedlibrary " + dotEscape(module.moduleName));
-            }
-        }
-        if (reloadNeeded)
-            reloadModules();
-        continueInferior();
     }
 }
 
@@ -1146,7 +1133,7 @@ void GdbEngine::handleAsyncOutput(const GdbMi &data)
 {
     const QString reason = data.findChild("reason").data();
 
-    QString console = data.findChild("consolestreamoutput").data();
+    QString msg = data.findChild("consolestreamoutput").data();
     if (reason.isEmpty()) {
         GdbMi frame = data.findChild("frame");
         if (frame.findChild("func").data() == "_start") {
@@ -1162,11 +1149,27 @@ void GdbEngine::handleAsyncOutput(const GdbMi &data)
             sendCommand("info pid", GdbInfoProc, QVariant(), true);
             #endif
             sendCommand("-file-list-exec-source-files", GdbQuerySources);
-            sendCommand("set auto-solib-add on");
+
             sendCommand("sharedlibrary libc"); // for malloc
             sendCommand("sharedlibrary libdl"); // for dlopen
             tryLoadCustomDumpers();
-            sendCommand("info shared", ModulesList, QVariant());
+
+            // intentionally after tryLoadCustomDumpers(),
+            // otherwise we'd interupt solib loading.
+            if (qq->wantsAllPluginBreakpoints()) {
+                sendCommand("set auto-solib-add on");
+                sendCommand("set stop-on-solib-events 0");
+                sendCommand("sharedlibrary .*");
+            } else if (qq->wantsSelectedPluginBreakpoints()) {
+                sendCommand("set auto-solib-add on");
+                sendCommand("set stop-on-solib-events 1");
+                sendCommand("sharedlibrary "+qq->selectedPluginBreakpointsPattern());
+            } else if (qq->wantsNoPluginBreakpoints()) {
+                // should be like that already
+                sendCommand("set auto-solib-add off");
+                sendCommand("set stop-on-solib-events 0");
+            }
+            reloadModules();
             // this will "continue" if done
             attemptBreakpointSynchronization();
             return;
@@ -1174,36 +1177,19 @@ void GdbEngine::handleAsyncOutput(const GdbMi &data)
         // fall through
     }
 
-#if 0
-    if (console.contains("Stopped due to shared library event") || reason.isEmpty()) {
-        ++m_shared;
-        //if (m_shared == 2)
-        //    tryLoadCustomDumpers();
-        //qDebug() << "SHARED LIBRARY EVENT " << data.toString() << m_shared;
-        if (qq->useFastStart()) {
-            if (1 || m_shared <= 16) { // libpthread?
-                sendCommand("info shared", GdbInfoShared);
-                //sendCommand("sharedlibrary gdbdebugger ");
-                //continueInferior();
-            } else {
-                // auto-load from now on
-                sendCommand("info shared");
-                sendCommand("set auto-solib-add on");
-                sendCommand("-file-list-exec-source-files", GdbQuerySources);
-                sendCommand("-break-list", BreakList);
-                //sendCommand("bt");
-                //QVariant var = QVariant::fromValue<GdbMi>(data);
-                //sendCommand("p 1", GdbAsyncOutput2, var);  // dummy
-                continueInferior();
-            }
-        } else {
-            // slow start requested.
-            q->showStatusMessage(tr("Loading %1...").arg(QString(data.toString())));
+    static bool modulesDirty = false;
+    if (msg.contains("Stopped due to shared library event") || reason.isEmpty()) {
+        if (qq->wantsSelectedPluginBreakpoints()) {
+            qDebug() << "SHARED LIBRARY EVENT " << data.toString();
+            qDebug() << "PATTERN" << qq->selectedPluginBreakpointsPattern();
+            sendCommand("sharedlibrary " + qq->selectedPluginBreakpointsPattern());
             continueInferior();
+            q->showStatusMessage(tr("Loading %1...").arg(QString(data.toString())));
+            return;
         }
-        return;
+        modulesDirty = true;
+        // fall through
     }
-#endif
 
     if (isExitedReason(reason)) {
         qq->notifyInferiorExited();
@@ -1256,11 +1242,17 @@ void GdbEngine::handleAsyncOutput(const GdbMi &data)
     }
 
     if (isStoppedReason(reason) || reason.isEmpty()) {
+        if (modulesDirty) {
+            sendCommand("-file-list-exec-source-files", GdbQuerySources);
+            sendCommand("-break-list", BreakList);
+            reloadModules();
+            modulesDirty = false;
+        }
         // Need another round trip
         if (reason == "breakpoint-hit") {
             q->showStatusMessage(tr("Stopped at breakpoint"));
             GdbMi frame = data.findChild("frame");
-            qDebug() << "HIT BREAKPOINT: " << frame.toString();
+            //qDebug() << "HIT BREAKPOINT: " << frame.toString();
             m_currentFrame = frame.findChild("addr").data() + '%' +
                  frame.findChild("func").data() + '%';
 
@@ -1504,7 +1496,6 @@ void GdbEngine::exitDebugger()
     m_fullToShortName.clear();
     m_varToType.clear();
     m_dataDumperState = DataDumperUninitialized;
-    m_shared = 0;
     m_outputCollector.shutdown();
     //q->settings()->m_debugDumpers = false;
 }
@@ -1572,12 +1563,7 @@ bool GdbEngine::startDebugger()
     q->showStatusMessage(tr("Gdb Running"));
 
     sendCommand("show version", GdbShowVersion);
-    if (qq->useFastStart()) {
-        sendCommand("set auto-solib-add off");
-        sendCommand("set stop-on-solib-events 1");
-    }
     //sendCommand("-enable-timings");
-    //sendCommand("set stop-on-solib-events 1");
     sendCommand("set print static-members off"); // Seemingly doesn't work.
     //sendCommand("define hook-stop\n-thread-list-ids\n-stack-list-frames\nend");
     //sendCommand("define hook-stop\nprint 4\nend");
@@ -4044,8 +4030,6 @@ void GdbEngine::tryLoadCustomDumpers()
     QString lib = q->m_buildDir + "/qtc-gdbmacros/libgdbmacros.so";
     if (QFileInfo(lib).isExecutable()) {
         //sendCommand("p dlopen");
-        //if (qq->useFastStart())
-        //    sendCommand("set stop-on-solib-events 0");
         QString flag = QString::number(RTLD_NOW);
         sendSynchronizedCommand("call (void)dlopen(\"" + lib + "\", " + flag + ")",
             WatchDumpCustomSetup);
@@ -4053,8 +4037,6 @@ void GdbEngine::tryLoadCustomDumpers()
         sendSynchronizedCommand("call (void)__dlopen(\"" + lib + "\", " + flag + ")",
             WatchDumpCustomSetup);
         sendSynchronizedCommand("sharedlibrary " + dotEscape(lib));
-        //if (qq->useFastStart())
-        //    sendCommand("set stop-on-solib-events 1");
     } else {
         qDebug() << "DEBUG HELPER LIBRARY IS NOT USABLE: "
             << lib << QFileInfo(lib).isExecutable();
@@ -4064,14 +4046,10 @@ void GdbEngine::tryLoadCustomDumpers()
     QString lib = q->m_buildDir + "/qtc-gdbmacros/libgdbmacros.dylib";
     if (QFileInfo(lib).isExecutable()) {
         //sendCommand("p dlopen"); // FIXME: remove me
-        //if (qq->useFastStart())
-        //    sendCommand("set stop-on-solib-events 0");
         QString flag = QString::number(RTLD_NOW);
         sendSyncronizedCommand("call (void)dlopen(\"" + lib + "\", " + flag + ")",
             WatchDumpCustomSetup);
-        sendSyncronizedCommand("sharedlibrary " + dotEscape(lib));
-        //if (qq->useFastStart())
-        //    sendCommand("set stop-on-solib-events 1");
+        sendSynchronizedCommand("sharedlibrary " + dotEscape(lib));
     } else {
         qDebug() << "DEBUG HELPER LIBRARY IS NOT USABLE: "
             << lib << QFileInfo(lib).isExecutable();
@@ -4080,15 +4058,11 @@ void GdbEngine::tryLoadCustomDumpers()
 #if defined(Q_OS_WIN)
     QString lib = q->m_buildDir + "/qtc-gdbmacros/debug/gdbmacros.dll";
     if (QFileInfo(lib).exists()) {
-        //if (qq->useFastStart())
-        //    sendCommand("set stop-on-solib-events 0");
         //sendCommand("handle SIGSEGV pass stop print");
         //sendCommand("set unwindonsignal off");
         sendSyncronizedCommand("call LoadLibraryA(\"" + lib + "\")",
             WatchDumpCustomSetup);
-        sendSyncronizedCommand("sharedlibrary " + dotEscape(lib));
-        //if (qq->useFastStart())
-        //    sendCommand("set stop-on-solib-events 1");
+        sendSynchronizedCommand("sharedlibrary " + dotEscape(lib));
     } else {
         qDebug() << "DEBUG HELPER LIBRARY IS NOT USABLE: "
             << lib << QFileInfo(lib).isExecutable();
diff --git a/src/plugins/debugger/gdbengine.h b/src/plugins/debugger/gdbengine.h
index fbb56a1b4d51e7b5e4021ae2bd67c2e63bb55786..7973ef4c68116e1804e7a870c1f784284d5edd02 100644
--- a/src/plugins/debugger/gdbengine.h
+++ b/src/plugins/debugger/gdbengine.h
@@ -217,7 +217,6 @@ private:
     int m_oldestAcceptableToken;
 
     int m_gdbVersion; // 6.8.0 is 680
-    int m_shared;
 
     // awful hack to keep track of used files
     QHash<QString, QString> m_shortToFullName;