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)
item->setSettingsKey(debugModeGroup, QLatin1String("BreakOnFatal"));
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
//
......
......@@ -155,6 +155,7 @@ enum DebuggerActionCode
BreakOnCatch,
BreakOnWarning,
BreakOnFatal,
BreakOnAbort,
// Registers
AlwaysAdjustRegistersColumnWidths,
......
......@@ -4932,6 +4932,9 @@ void GdbEngine::handleNamespaceExtraction(const GdbResponse &response)
if (startParameters().startMode == AttachCore) {
notifyInferiorSetupOk(); // No breakpoints in core files.
} else {
if (debuggerCore()->boolSetting(BreakOnAbort)
&& startParameters().toolChainAbi.os() == Abi::WindowsOS)
postCommand("-break-insert -f raise");
if (debuggerCore()->boolSetting(BreakOnWarning))
postCommand("-break-insert -f '" + qtNamespace() + "qWarning'");
if (debuggerCore()->boolSetting(BreakOnFatal))
......
......@@ -71,6 +71,7 @@ public:
QCheckBox *checkBoxAutoEnrichParameters;
QCheckBox *checkBoxBreakOnWarning;
QCheckBox *checkBoxBreakOnFatal;
QCheckBox *checkBoxBreakOnAbort;
QCheckBox *checkBoxEnableReverseDebugging;
QGroupBox *groupBoxStartupCommands;
......@@ -164,6 +165,9 @@ public:
checkBoxBreakOnFatal = new QCheckBox(groupBoxGeneral);
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->setText(GdbOptionsPage::tr("Enable reverse debugging"));
checkBoxEnableReverseDebugging->setToolTip(GdbOptionsPage::tr(
......@@ -217,6 +221,7 @@ public:
formLayout->addRow(checkBoxAutoEnrichParameters);
formLayout->addRow(checkBoxBreakOnWarning);
formLayout->addRow(checkBoxBreakOnFatal);
formLayout->addRow(checkBoxBreakOnAbort);
formLayout->addRow(checkBoxEnableReverseDebugging);
QGridLayout *startLayout = new QGridLayout(groupBoxStartupCommands);
......@@ -293,6 +298,8 @@ QWidget *GdbOptionsPage::createPage(QWidget *parent)
m_ui->checkBoxBreakOnWarning);
m_group.insert(debuggerCore()->action(BreakOnFatal),
m_ui->checkBoxBreakOnFatal);
m_group.insert(debuggerCore()->action(BreakOnAbort),
m_ui->checkBoxBreakOnAbort);
m_group.insert(debuggerCore()->action(GdbWatchdogTimeout),
m_ui->spinBoxGdbWatchdogTimeout);
......
Markdown is supported
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