From d24752a765cca7cd439337c2a9ed0d1345652699 Mon Sep 17 00:00:00 2001
From: hjk <qtc-committer@nokia.com>
Date: Wed, 23 Sep 2009 13:59:55 +0200
Subject: [PATCH] debugger: remove more dead code

---
 src/plugins/debugger/gdb/gdbengine.cpp | 51 +++-----------------------
 src/plugins/debugger/gdb/gdbengine.h   |  3 --
 2 files changed, 6 insertions(+), 48 deletions(-)

diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index 12fb509fca4..1fbd98e7798 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -324,7 +324,6 @@ void GdbEngine::initializeVariables()
     m_outputCodec = QTextCodec::codecForLocale();
     m_pendingRequests = 0;
     m_continuationAfterDone = 0;
-    m_waitingForFirstBreakpointToBeHit = false;
     m_commandsToRunOnTemporaryBreak.clear();
     m_cookieForToken.clear();
     m_customOutputForToken.clear();
@@ -1122,21 +1121,6 @@ void GdbEngine::handleAsyncOutput(const GdbMi &data)
         return;
     }
 
-    //MAC: bool isFirstStop = data.findChild("bkptno").data() == "1";
-    //!MAC: startSymbolName == data.findChild("frame").findChild("func")
-    if (m_waitingForFirstBreakpointToBeHit) {
-        m_waitingForFirstBreakpointToBeHit = false;
-
-        // If the executable dies already that early we might get something
-        // like >49*stopped,reason="exited",exit-code="0177"
-        // This is handled now above.
-
-        qq->notifyInferiorStopped();
-        handleAqcuiredInferior();
-// FIXME:        m_continuationAfterDone = true;
-        return;
-    }
-
     if (!m_commandsToRunOnTemporaryBreak.isEmpty()) {
         QTC_ASSERT(status() == DebuggerInferiorStopRequested,
             qDebug() << "STATUS:" << status())
@@ -1369,11 +1353,13 @@ void GdbEngine::handleStop2(const GdbMi &data)
     qq->stackHandler()->setCurrentIndex(0);
     updateLocals(); // Quick shot
 
-    int currentId = data.findChild("thread-id").data().toInt();
-
     reloadStack();
-    if (supportsThreads())
-        postCommand(_("-thread-list-ids"), WatchUpdate, CB(handleStackListThreads), currentId);
+
+    if (supportsThreads()) {
+        int currentId = data.findChild("thread-id").data().toInt();
+        postCommand(_("-thread-list-ids"), WatchUpdate,
+            CB(handleStackListThreads), currentId);
+    }
 
     //
     // Registers
@@ -1616,31 +1602,6 @@ void GdbEngine::continueInferior()
 }
 
 #if 0
-void GdbEngine::handleAttach(const GdbResultRecord &, const QVariant &)
-{
-    qq->notifyInferiorStopped();
-    showStatusMessage(tr("Attached to running process. Stopped."));
-    handleAqcuiredInferior();
-
-    m_manager->resetLocation();
-    recheckDebuggingHelperAvailability();
-
-    //
-    // Stack
-    //
-    qq->stackHandler()->setCurrentIndex(0);
-    updateLocals(); // Quick shot
-
-    reloadStack();
-    if (supportsThreads())
-        postCommand(_("-thread-list-ids"), WatchUpdate, CB(handleStackListThreads), 0);
-
-    //
-    // Registers
-    //
-    qq->reloadRegisters();
-}
-
 void GdbEngine::handleSetTargetAsync(const GdbResultRecord &record, const QVariant &)
 {
     if (record.resultClass == GdbResultDone) {
diff --git a/src/plugins/debugger/gdb/gdbengine.h b/src/plugins/debugger/gdb/gdbengine.h
index eb97e06c6a5..4ab56fb4e87 100644
--- a/src/plugins/debugger/gdb/gdbengine.h
+++ b/src/plugins/debugger/gdb/gdbengine.h
@@ -251,7 +251,6 @@ private:
     int terminationIndex(const QByteArray &buffer, int &length);
     void handleResponse(const QByteArray &buff);
     void handleStart(const GdbResultRecord &response, const QVariant &);
-    //void handleAttach(const GdbResultRecord &, const QVariant &);
     void handleAqcuiredInferior();
     void handleAsyncOutput(const GdbMi &data);
     void handleStop1(const GdbResultRecord &, const QVariant &cookie);
@@ -260,7 +259,6 @@ private:
     void handleResultRecord(const GdbResultRecord &response);
     void handleFileExecAndSymbols(const GdbResultRecord &response, const QVariant &);
     void handleExecContinue(const GdbResultRecord &response, const QVariant &);
-    //void handleExecRun(const GdbResultRecord &response, const QVariant &);
     void handleExecJumpToLine(const GdbResultRecord &response, const QVariant &);
     void handleExecRunToFunction(const GdbResultRecord &response, const QVariant &);
     void handleInfoShared(const GdbResultRecord &response, const QVariant &);
@@ -432,7 +430,6 @@ private:
     Continuation m_continuationAfterDone;
     void handleInitialBreakpointsSet();
 
-    bool m_waitingForFirstBreakpointToBeHit;
     bool m_modulesListOutdated;
 
     QList<GdbCommand> m_commandsToRunOnTemporaryBreak;
-- 
GitLab