diff --git a/src/plugins/debugger/gdbengine.cpp b/src/plugins/debugger/gdbengine.cpp
index 1ee6d6956a7c975059f6b5487d1fc4c7cd77c679..1a0ede266267c53d89e6496fcf364d1065ca15f4 100644
--- a/src/plugins/debugger/gdbengine.cpp
+++ b/src/plugins/debugger/gdbengine.cpp
@@ -125,7 +125,6 @@ enum GdbCommandType
     GdbInfoProc,
     GdbQueryDataDumper1,
     GdbQueryDataDumper2,
-    GdbInitializeSocket1,
 
     BreakCondition = 200,
     BreakEnablePending,
@@ -634,18 +633,10 @@ void GdbEngine::readGdbStandardOutput()
 {
     // This is the function called whenever the Gdb process created
     // output. As a rule of thumb, stdout contains _real_ Gdb output
-    // as responses to our command (with exception of the data dumpers)
+    // as responses to our command
     // and "spontaneous" events like messages on loaded shared libraries.
-    // Otoh, stderr contains application output produced by qDebug etc.
-    // There is no organized way to pass application stdout output
-
-    // The result of custom data dumpers arrives over the socket _before_
-    // the corresponding Gdb "^done" message arrives here over stdout
-    // and is merged into the response via m_pendingCustomValueContents.
-
-    // Note that this code here runs syncronized to the arriving
-    // output. The completed response will be signalled by a queued
-    // connection to the handlers.
+    // OTOH, stderr contains application output produced by qDebug etc.
+    // There is no organized way to pass application stdout output.
 
     QByteArray out = m_gdbProc.readAllStandardOutput();
 
@@ -766,8 +757,6 @@ void GdbEngine::handleResultRecord(const GdbResultRecord &record)
     //qDebug() << "TOKEN: " << record.token
     //    << " ACCEPTABLE: " << m_oldestAcceptableToken;
     //qDebug() << "";
-    //qDebug() << qPrintable(currentTime()) << "Reading response:  "
-    //   << record.toString() << "\n";
     //qDebug() << "\nRESULT" << record.token << record.toString();
 
     int token = record.token;
@@ -854,9 +843,6 @@ void GdbEngine::handleResult(const GdbResultRecord & record, int type,
         case GdbInfoShared:
             handleInfoShared(record);
             break;
-        case GdbInitializeSocket1:
-            //qDebug() << " INIT SOCKET" << record.toString();
-            break;
         case GdbQueryDataDumper1:
             handleQueryDataDumper1(record);
             break;
diff --git a/src/plugins/debugger/gdbengine.h b/src/plugins/debugger/gdbengine.h
index 45eafcdb92c6172f62fa634f4fb450b79e87f29c..85f72dc84d7216c982673113e3dd1494bc6b1ea2 100644
--- a/src/plugins/debugger/gdbengine.h
+++ b/src/plugins/debugger/gdbengine.h
@@ -206,8 +206,6 @@ private:
     void handleShowVersion(const GdbResultRecord &response);
     void handleQueryPwd(const GdbResultRecord &response);
     void handleQuerySources(const GdbResultRecord &response);
-    void handleQuerySources2(const GdbResultRecord &response,
-        const QVariant &);
 
     QByteArray m_inbuffer;
 
@@ -219,7 +217,6 @@ private:
     QByteArray m_pendingConsoleStreamOutput;
     QByteArray m_pendingTargetStreamOutput;
     QByteArray m_pendingLogStreamOutput;
-    //QByteArray m_pendingCustomValueContents;
     QString m_pwd;
 
     // contains the first token number for the current round