Commit 87de8197 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by hjk
Browse files

GDB/Windows: Break on abort



Task-number: QTCREATORBUG-6773
Change-Id: I082b7d04730a5014ad935d6a079a1829dfcdd34c
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 130990ff
...@@ -337,6 +337,14 @@ DebuggerSettings::DebuggerSettings(QSettings *settings) ...@@ -337,6 +337,14 @@ DebuggerSettings::DebuggerSettings(QSettings *settings)
item->setSettingsKey(debugModeGroup, QLatin1String("BreakOnFatal")); item->setSettingsKey(debugModeGroup, QLatin1String("BreakOnFatal"));
insertItem(BreakOnFatal, item); insertItem(BreakOnFatal, item);
item = new SavedAction(this);
item->setText(tr("Break on \"abort\""));
item->setCheckable(true);
item->setDefaultValue(false);
item->setValue(false);
item->setSettingsKey(debugModeGroup, QLatin1String("BreakOnAbort"));
insertItem(BreakOnAbort, item);
// //
// Settings // Settings
// //
......
...@@ -155,6 +155,7 @@ enum DebuggerActionCode ...@@ -155,6 +155,7 @@ enum DebuggerActionCode
BreakOnCatch, BreakOnCatch,
BreakOnWarning, BreakOnWarning,
BreakOnFatal, BreakOnFatal,
BreakOnAbort,
// Registers // Registers
AlwaysAdjustRegistersColumnWidths, AlwaysAdjustRegistersColumnWidths,
......
...@@ -4932,6 +4932,9 @@ void GdbEngine::handleNamespaceExtraction(const GdbResponse &response) ...@@ -4932,6 +4932,9 @@ void GdbEngine::handleNamespaceExtraction(const GdbResponse &response)
if (startParameters().startMode == AttachCore) { if (startParameters().startMode == AttachCore) {
notifyInferiorSetupOk(); // No breakpoints in core files. notifyInferiorSetupOk(); // No breakpoints in core files.
} else { } else {
if (debuggerCore()->boolSetting(BreakOnAbort)
&& startParameters().toolChainAbi.os() == Abi::WindowsOS)
postCommand("-break-insert -f raise");
if (debuggerCore()->boolSetting(BreakOnWarning)) if (debuggerCore()->boolSetting(BreakOnWarning))
postCommand("-break-insert -f '" + qtNamespace() + "qWarning'"); postCommand("-break-insert -f '" + qtNamespace() + "qWarning'");
if (debuggerCore()->boolSetting(BreakOnFatal)) if (debuggerCore()->boolSetting(BreakOnFatal))
......
...@@ -71,6 +71,7 @@ public: ...@@ -71,6 +71,7 @@ public:
QCheckBox *checkBoxAutoEnrichParameters; QCheckBox *checkBoxAutoEnrichParameters;
QCheckBox *checkBoxBreakOnWarning; QCheckBox *checkBoxBreakOnWarning;
QCheckBox *checkBoxBreakOnFatal; QCheckBox *checkBoxBreakOnFatal;
QCheckBox *checkBoxBreakOnAbort;
QCheckBox *checkBoxEnableReverseDebugging; QCheckBox *checkBoxEnableReverseDebugging;
QGroupBox *groupBoxStartupCommands; QGroupBox *groupBoxStartupCommands;
...@@ -164,6 +165,9 @@ public: ...@@ -164,6 +165,9 @@ public:
checkBoxBreakOnFatal = new QCheckBox(groupBoxGeneral); checkBoxBreakOnFatal = new QCheckBox(groupBoxGeneral);
checkBoxBreakOnFatal->setText(GdbOptionsPage::tr("Stop when a qFatal is issued")); checkBoxBreakOnFatal->setText(GdbOptionsPage::tr("Stop when a qFatal is issued"));
checkBoxBreakOnAbort = new QCheckBox(groupBoxGeneral);
checkBoxBreakOnAbort->setText(GdbOptionsPage::tr("Stop when abort is called"));
checkBoxEnableReverseDebugging = new QCheckBox(groupBoxGeneral); checkBoxEnableReverseDebugging = new QCheckBox(groupBoxGeneral);
checkBoxEnableReverseDebugging->setText(GdbOptionsPage::tr("Enable reverse debugging")); checkBoxEnableReverseDebugging->setText(GdbOptionsPage::tr("Enable reverse debugging"));
checkBoxEnableReverseDebugging->setToolTip(GdbOptionsPage::tr( checkBoxEnableReverseDebugging->setToolTip(GdbOptionsPage::tr(
...@@ -217,6 +221,7 @@ public: ...@@ -217,6 +221,7 @@ public:
formLayout->addRow(checkBoxAutoEnrichParameters); formLayout->addRow(checkBoxAutoEnrichParameters);
formLayout->addRow(checkBoxBreakOnWarning); formLayout->addRow(checkBoxBreakOnWarning);
formLayout->addRow(checkBoxBreakOnFatal); formLayout->addRow(checkBoxBreakOnFatal);
formLayout->addRow(checkBoxBreakOnAbort);
formLayout->addRow(checkBoxEnableReverseDebugging); formLayout->addRow(checkBoxEnableReverseDebugging);
QGridLayout *startLayout = new QGridLayout(groupBoxStartupCommands); QGridLayout *startLayout = new QGridLayout(groupBoxStartupCommands);
...@@ -293,6 +298,8 @@ QWidget *GdbOptionsPage::createPage(QWidget *parent) ...@@ -293,6 +298,8 @@ QWidget *GdbOptionsPage::createPage(QWidget *parent)
m_ui->checkBoxBreakOnWarning); m_ui->checkBoxBreakOnWarning);
m_group.insert(debuggerCore()->action(BreakOnFatal), m_group.insert(debuggerCore()->action(BreakOnFatal),
m_ui->checkBoxBreakOnFatal); m_ui->checkBoxBreakOnFatal);
m_group.insert(debuggerCore()->action(BreakOnAbort),
m_ui->checkBoxBreakOnAbort);
m_group.insert(debuggerCore()->action(GdbWatchdogTimeout), m_group.insert(debuggerCore()->action(GdbWatchdogTimeout),
m_ui->spinBoxGdbWatchdogTimeout); m_ui->spinBoxGdbWatchdogTimeout);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment