From 2548779d1fdeeb8a65769283bb4d72079e87209c Mon Sep 17 00:00:00 2001
From: hjk <qtc-committer@nokia.com>
Date: Fri, 11 Dec 2009 15:37:23 +0100
Subject: [PATCH] debugger: Remove EmbedToken fglag for gdb commands.

The token is not needed anymore.
---
 src/plugins/debugger/gdb/gdbengine.cpp | 11 ++++-------
 src/plugins/debugger/gdb/gdbengine.h   |  1 -
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index 5dcef213a68..def3ae40c17 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -801,8 +801,6 @@ void GdbEngine::flushCommand(const GdbCommand &cmd0)
     cmd.postTime = QTime::currentTime();
     m_cookieForToken[currentToken()] = cmd;
     cmd.command = QString::number(currentToken()) + cmd.command;
-    if (cmd.flags & EmbedToken)
-        cmd.command = cmd.command.arg(currentToken());
     gdbInputAvailable(LogInput, cmd.command);
 
     m_gdbAdapter->write(cmd.command.toLatin1() + "\r\n");
@@ -2968,11 +2966,10 @@ void GdbEngine::runDebuggingHelper(const WatchData &data0, bool dumpChildren)
 
     QString cmd;
     QTextStream(&cmd) << "call " << "(void*)qDumpObjectData440(" <<
-            protocol << ',' << "%1+1"                // placeholder for token
-            <<',' <<  addr << ',' << (dumpChildren ? "1" : "0")
+            protocol << ",0," <<  addr << ',' << (dumpChildren ? "1" : "0")
             << ',' << extraArgs.join(QString(_c(','))) <<  ')';
 
-    postCommand(cmd, WatchUpdate | EmbedToken);
+    postCommand(cmd, WatchUpdate);
 
     showStatusMessage(msgRetrievingWatchData(m_pendingRequests + 1), 10000);
 
@@ -4094,7 +4091,7 @@ void GdbEngine::tryLoadDebuggingHelpers()
 void GdbEngine::tryQueryDebuggingHelpers()
 {
     // retrieve list of dumpable classes
-    postCommand(_("call (void*)qDumpObjectData440(1,%1+1,0,0,0,0,0,0)"), EmbedToken);
+    postCommand(_("call (void*)qDumpObjectData440(1,0,0,0,0,0,0,0)"));
     postCommand(_("p (char*)&qDumpOutBuffer"), CB(handleQueryDebuggingHelper));
 }
 
@@ -4102,7 +4099,7 @@ void GdbEngine::recheckDebuggingHelperAvailability()
 {
     if (m_gdbAdapter->dumperHandling() != AbstractGdbAdapter::DumperNotAvailable) {
         // retreive list of dumpable classes
-        postCommand(_("call (void*)qDumpObjectData440(1,%1+1,0,0,0,0,0,0)"), EmbedToken);
+        postCommand(_("call (void*)qDumpObjectData440(1,0,0,0,0,0,0,0)"));
         postCommand(_("p (char*)&qDumpOutBuffer"), CB(handleQueryDebuggingHelper));
     }
 }
diff --git a/src/plugins/debugger/gdb/gdbengine.h b/src/plugins/debugger/gdb/gdbengine.h
index 92937913479..fb89a9a624a 100644
--- a/src/plugins/debugger/gdb/gdbengine.h
+++ b/src/plugins/debugger/gdb/gdbengine.h
@@ -177,7 +177,6 @@ private: ////////// Gdb Command Management //////////
         Discardable = 2,  // No need to wait for the reply before continuing inferior
         RebuildModel = 4, // Trigger model rebuild when no such commands are pending any more
         WatchUpdate = Discardable | RebuildModel,
-        EmbedToken = 8,   // Expand %1 in the command to the command token
         RunRequest = 16,  // Callback expects GdbResultRunning instead of GdbResultDone
         ExitRequest = 32, // Callback expects GdbResultExit instead of GdbResultDone
         LosesChild = 64   // Auto-set inferior shutdown related states
-- 
GitLab