From 053f36c45dd2e904c0eea3924a48eb7c9c4a1198 Mon Sep 17 00:00:00 2001
From: hjk <qtc-committer@nokia.com>
Date: Mon, 6 Sep 2010 11:29:52 +0200
Subject: [PATCH] debugger: move watch dog initialization to a better place

It was missed by the remote adapter before.
---
 src/plugins/debugger/gdb/gdbengine.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index 942ccf713b9..47f0810a9db 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -802,6 +802,9 @@ void GdbEngine::flushCommand(const GdbCommand &cmd0)
 
     m_gdbAdapter->write(cmd.command + "\r\n");
 
+    // Start Watchdog.
+    if (m_commandTimer->interval() <= 20000)
+        m_commandTimer->setInterval(commandTimeoutTime());
     m_commandTimer->start();
 
     //if (cmd.flags & LosesChild)
@@ -4019,8 +4022,6 @@ bool GdbEngine::startGdb(const QStringList &args, const QString &gdb, const QStr
     }
 
     showMessage(_("GDB STARTED, INITIALIZING IT"));
-    m_commandTimer->setInterval(commandTimeoutTime());
-
     postCommand("show version", CB(handleShowVersion));
 
     //postCommand("-enable-timings");
-- 
GitLab