diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 919ee6c7534..0f4fe9d7729 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -784,8 +784,8 @@ void GdbEngine::runCommand(const DebuggerCommand &command) } // Start Watchdog. - if (m_commandTimer.interval() <= 20000) - m_commandTimer.setInterval(commandTimeoutTime()); + const int watchDogMilliSecs = settings().gdbWatchdogTimeout() * 1000; + m_commandTimer.setInterval(watchDogMilliSecs); // The process can die for external reason between the "-gdb-exit" was // sent and a response could be retrieved. We don't want the watchdog // to bark in that case since the only possible outcome is a dead @@ -798,12 +798,6 @@ void GdbEngine::runCommand(const DebuggerCommand &command) } } -int GdbEngine::commandTimeoutTime() const -{ - const int time = settings().gdbWatchdogTimeout(); - return 1000 * qMax(20, time); -} - void GdbEngine::commandTimeout() { const QList keys = Utils::sorted(m_commandForToken.keys()); diff --git a/src/plugins/debugger/gdb/gdbengine.h b/src/plugins/debugger/gdb/gdbengine.h index c7efe0cbaf6..a396ad55079 100644 --- a/src/plugins/debugger/gdb/gdbengine.h +++ b/src/plugins/debugger/gdb/gdbengine.h @@ -116,7 +116,6 @@ private: ////////// General Interface ////////// QHash m_commandForToken; QHash m_flagsForToken; - int commandTimeoutTime() const; QTimer m_commandTimer; QString m_pendingConsoleStreamOutput; diff --git a/src/plugins/debugger/gdb/gdbsettings.cpp b/src/plugins/debugger/gdb/gdbsettings.cpp index eef19df9719..04688b54837 100644 --- a/src/plugins/debugger/gdb/gdbsettings.cpp +++ b/src/plugins/debugger/gdb/gdbsettings.cpp @@ -187,9 +187,9 @@ GdbSettings::GdbSettings() "calls and is very likely to destroy your debugging session.

")); gdbWatchdogTimeout.setSettingsKey("WatchdogTimeout"); - gdbWatchdogTimeout.setDefaultValue(20); + gdbWatchdogTimeout.setDefaultValue(40); gdbWatchdogTimeout.setSuffix(Tr::tr("sec")); - gdbWatchdogTimeout.setRange(20, 1000000); + gdbWatchdogTimeout.setRange(10, 1000000); gdbWatchdogTimeout.setLabelText(Tr::tr("GDB timeout:")); gdbWatchdogTimeout.setToolTip(Tr::tr( "The number of seconds before a non-responsive GDB process is terminated.\n"