forked from qt-creator/qt-creator
debugger: make watchdog timeout configurable
This commit is contained in:
@@ -399,6 +399,12 @@ DebuggerSettings *DebuggerSettings::instance()
|
|||||||
item->setText(tr("Execute line"));
|
item->setText(tr("Execute line"));
|
||||||
instance->insertItem(ExecuteCommand, item);
|
instance->insertItem(ExecuteCommand, item);
|
||||||
|
|
||||||
|
item = new SavedAction(instance);
|
||||||
|
item->setSettingsKey(debugModeGroup, QLatin1String("WatchdogTimeout"));
|
||||||
|
item->setDefaultValue(20);
|
||||||
|
instance->insertItem(GdbWatchdogTimeout, item);
|
||||||
|
|
||||||
|
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -100,6 +100,7 @@ enum DebuggerActionCode
|
|||||||
GdbEnvironment,
|
GdbEnvironment,
|
||||||
GdbScriptFile,
|
GdbScriptFile,
|
||||||
ExecuteCommand,
|
ExecuteCommand,
|
||||||
|
GdbWatchdogTimeout,
|
||||||
|
|
||||||
// Stack
|
// Stack
|
||||||
MaximalStackDepth,
|
MaximalStackDepth,
|
||||||
|
@@ -362,6 +362,7 @@ QWidget *CommonOptionsPage::createPage(QWidget *parent)
|
|||||||
m_ui.checkBoxEnableReverseDebugging);
|
m_ui.checkBoxEnableReverseDebugging);
|
||||||
m_group.insert(theDebuggerAction(MaximalStackDepth),
|
m_group.insert(theDebuggerAction(MaximalStackDepth),
|
||||||
m_ui.spinBoxMaximalStackDepth);
|
m_ui.spinBoxMaximalStackDepth);
|
||||||
|
m_group.insert(theDebuggerAction(GdbWatchdogTimeout), 0);
|
||||||
m_group.insert(theDebuggerAction(ShowStdNamespace), 0);
|
m_group.insert(theDebuggerAction(ShowStdNamespace), 0);
|
||||||
m_group.insert(theDebuggerAction(ShowQtNamespace), 0);
|
m_group.insert(theDebuggerAction(ShowQtNamespace), 0);
|
||||||
m_group.insert(theDebuggerAction(LogTimeStamps), 0);
|
m_group.insert(theDebuggerAction(LogTimeStamps), 0);
|
||||||
|
@@ -194,7 +194,8 @@ GdbEngine::GdbEngine(DebuggerManager *manager) :
|
|||||||
|
|
||||||
m_commandTimer = new QTimer(this);
|
m_commandTimer = new QTimer(this);
|
||||||
m_commandTimer->setSingleShot(true);
|
m_commandTimer->setSingleShot(true);
|
||||||
m_commandTimer->setInterval(COMMAND_TIMEOUT);
|
m_commandTimer->setInterval(
|
||||||
|
1000 * qMin(20, theDebuggerAction(GdbWatchdogTimeout)->value().toInt()));
|
||||||
connect(m_commandTimer, SIGNAL(timeout()), SLOT(commandTimeout()));
|
connect(m_commandTimer, SIGNAL(timeout()), SLOT(commandTimeout()));
|
||||||
|
|
||||||
// Needs no resetting in initializeVariables()
|
// Needs no resetting in initializeVariables()
|
||||||
|
@@ -235,7 +235,6 @@ private: ////////// Gdb Command Management //////////
|
|||||||
|
|
||||||
QHash<int, GdbCommand> m_cookieForToken;
|
QHash<int, GdbCommand> m_cookieForToken;
|
||||||
QTimer *m_commandTimer;
|
QTimer *m_commandTimer;
|
||||||
enum { COMMAND_TIMEOUT = 20000 };
|
|
||||||
|
|
||||||
QByteArray m_pendingConsoleStreamOutput;
|
QByteArray m_pendingConsoleStreamOutput;
|
||||||
QByteArray m_pendingLogStreamOutput;
|
QByteArray m_pendingLogStreamOutput;
|
||||||
|
@@ -51,6 +51,9 @@ QWidget *GdbOptionsPage::createPage(QWidget *parent)
|
|||||||
m_ui.environmentEdit);
|
m_ui.environmentEdit);
|
||||||
m_group.insert(theDebuggerAction(UsePreciseBreakpoints),
|
m_group.insert(theDebuggerAction(UsePreciseBreakpoints),
|
||||||
m_ui.checkBoxUsePreciseBreakpoints);
|
m_ui.checkBoxUsePreciseBreakpoints);
|
||||||
|
m_group.insert(theDebuggerAction(GdbWatchdogTimeout),
|
||||||
|
m_ui.spinBoxGdbWatchdogTimeout);
|
||||||
|
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
m_ui.groupBoxPluginDebugging->hide();
|
m_ui.groupBoxPluginDebugging->hide();
|
||||||
|
@@ -2,6 +2,14 @@
|
|||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>GdbOptionsPage</class>
|
<class>GdbOptionsPage</class>
|
||||||
<widget class="QWidget" name="GdbOptionsPage">
|
<widget class="QWidget" name="GdbOptionsPage">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>397</width>
|
||||||
|
<height>322</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBoxLocations">
|
<widget class="QGroupBox" name="groupBoxLocations">
|
||||||
@@ -29,7 +37,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="Utils::PathChooser" name="gdbLocationChooser"/>
|
<widget class="Utils::PathChooser" name="gdbLocationChooser" native="true"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="labelEnvironment">
|
<widget class="QLabel" name="labelEnvironment">
|
||||||
@@ -55,19 +63,55 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="2" column="1">
|
||||||
<widget class="Utils::PathChooser" name="scriptFileChooser"/>
|
<widget class="Utils::PathChooser" name="scriptFileChooser" native="true"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0" colspan="2">
|
<item row="3" column="0" colspan="2">
|
||||||
<widget class="QCheckBox" name="checkBoxUsePreciseBreakpoints">
|
<widget class="QCheckBox" name="checkBoxUsePreciseBreakpoints">
|
||||||
<property name="text">
|
|
||||||
<string>Use full path information to set breakpoints</string>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>When this option is checked, the debugger plugin attempts
|
<string>When this option is checked, the debugger plugin attempts
|
||||||
to extract full path information for all source files from gdb. This is a
|
to extract full path information for all source files from gdb. This is a
|
||||||
slow process but enables setting breakpoints in files with the same file
|
slow process but enables setting breakpoints in files with the same file
|
||||||
name in different directories.</string>
|
name in different directories.</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Use full path information to set breakpoints</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="labelGdbWatchdogTimeout">
|
||||||
|
<property name="text">
|
||||||
|
<string>Gdb timeout:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBoxGdbWatchdogTimeout">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>This is the number of second Qt Creator will wait before
|
||||||
|
it terminates non-reacting gdb process. The default value of 20 seconds
|
||||||
|
should be sufficient for most applications, but there are situations when
|
||||||
|
loading big libraries or listing source files takes much longer than that
|
||||||
|
on slow machines. In this case the value should be increased.</string>
|
||||||
|
</property>
|
||||||
|
<property name="layoutDirection">
|
||||||
|
<enum>Qt::LeftToRight</enum>
|
||||||
|
</property>
|
||||||
|
<property name="specialValueText">
|
||||||
|
<string><unlimited></string>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<number>20</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000000</number>
|
||||||
|
</property>
|
||||||
|
<property name="singleStep">
|
||||||
|
<number>20</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>20</number>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
Reference in New Issue
Block a user