From 0c801e734e0378a04d5be3247f001d4f3a9decf5 Mon Sep 17 00:00:00 2001
From: hjk <qtc-committer@nokia.com>
Date: Wed, 15 Sep 2010 14:16:03 +0200
Subject: [PATCH] debugger: make a few stack and thread related commands
 discardable

---
 src/plugins/debugger/gdb/gdbengine.cpp | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index fbd64176855..7615fce520a 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -1479,10 +1479,12 @@ void GdbEngine::handleStop1(const GdbMi &data)
         if (m_gdbAdapter->isTrkAdapter()) {
             m_gdbAdapter->trkReloadThreads();
         } else if (m_isMacGdb) {
-            postCommand("-thread-list-ids", CB(handleThreadListIds), currentId);
+            postCommand("-thread-list-ids", Discardable,
+                CB(handleThreadListIds), currentId);
         } else {
             // This is only available in gdb 7.1+.
-            postCommand("-thread-info", CB(handleThreadInfo), currentId);
+            postCommand("-thread-info", Discardable,
+                CB(handleThreadInfo), currentId);
         }
     }
 
@@ -2761,7 +2763,8 @@ void GdbEngine::selectThread(int index)
     QTC_ASSERT(index < threads.size(), return);
     const int id = threads.at(index).id;
     showStatusMessage(tr("Retrieving data for stack view thread 0x%1...").arg(id, 0, 16), 10000);
-    postCommand("-thread-select " + QByteArray::number(id), CB(handleStackSelectThread));
+    postCommand("-thread-select " + QByteArray::number(id),
+        CB(handleStackSelectThread));
 }
 
 void GdbEngine::handleStackSelectThread(const GdbResponse &)
@@ -2777,7 +2780,7 @@ void GdbEngine::handleStackSelectThread(const GdbResponse &)
 void GdbEngine::reloadFullStack()
 {
     PENDING_DEBUG("RELOAD FULL STACK");
-    postCommand("-stack-list-frames", CB(handleStackListFrames),
+    postCommand("-stack-list-frames", Discardable, CB(handleStackListFrames),
         QVariant::fromValue<StackCookie>(StackCookie(true, true)));
 }
 
@@ -2797,7 +2800,7 @@ void GdbEngine::reloadStack(bool forceGotoLocation)
     // FIXME: Seems to work with 6.8.
     if (m_gdbAdapter->isTrkAdapter() && m_gdbVersion < 6.8)
         postCommand(cmd);
-    postCommand(cmd, CB(handleStackListFrames),
+    postCommand(cmd, Discardable, CB(handleStackListFrames),
         QVariant::fromValue<StackCookie>(StackCookie(false, forceGotoLocation)));
 }
 
-- 
GitLab