diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp index 0c0ca5da820..5bcd4931091 100644 --- a/src/plugins/debugger/cdb/cdbengine.cpp +++ b/src/plugins/debugger/cdb/cdbengine.cpp @@ -825,6 +825,14 @@ void CdbEngine::runEngine() postCommand(breakAtFunctionCommand(breakFunction), 0); } } + if (debuggerCore()->boolSetting(BreakOnWarning)) { + postCommand("bm /( QtCored4!qWarning", 0); // 'bm': All overloads. + postCommand("bm /( Qt5Cored!QMessageLogger::warning", 0); + } + if (debuggerCore()->boolSetting(BreakOnFatal)) { + postCommand("bm /( QtCored4!qFatal", 0); // 'bm': All overloads. + postCommand("bm /( Qt5Cored!QMessageLogger::fatal", 0); + } if (startParameters().startMode == AttachCore) { QTC_ASSERT(!m_coreStopReason.isNull(), return; ); notifyInferiorUnrunnable(); diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 500724ebdeb..fb12b6fda45 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -5096,13 +5096,18 @@ void GdbEngine::handleNamespaceExtraction(const GdbResponse &response) } else { if (debuggerCore()->boolSetting(BreakOnAbort)) postCommand("-break-insert -f abort"); - if (debuggerCore()->boolSetting(BreakOnWarning)) + if (debuggerCore()->boolSetting(BreakOnWarning)) { postCommand("-break-insert -f '" + qtNamespace() + "qWarning'"); - if (debuggerCore()->boolSetting(BreakOnFatal)) + postCommand("-break-insert -f '" + qtNamespace() + "QMessageLogger::warning'"); + } + if (debuggerCore()->boolSetting(BreakOnFatal)) { postCommand("-break-insert -f '" + qtNamespace() + "qFatal'", - CB(handleBreakOnQFatal)); - else + CB(handleBreakOnQFatal), QVariant(false)); + postCommand("-break-insert -f '" + qtNamespace() + "QMessageLogger::fatal'", + CB(handleBreakOnQFatal), QVariant(true)); + } else { notifyInferiorSetupOk(); + } } } @@ -5119,7 +5124,8 @@ void GdbEngine::handleBreakOnQFatal(const GdbResponse &response) } // Continue setup. - notifyInferiorSetupOk(); + if (response.cookie.toBool()) + notifyInferiorSetupOk(); } void GdbEngine::notifyInferiorSetupFailed(const QString &msg) diff --git a/src/plugins/debugger/gdb/gdboptionspage.cpp b/src/plugins/debugger/gdb/gdboptionspage.cpp index ddeb0ed6e4f..44c0a006274 100644 --- a/src/plugins/debugger/gdb/gdboptionspage.cpp +++ b/src/plugins/debugger/gdb/gdboptionspage.cpp @@ -187,6 +187,7 @@ GdbOptionsPageWidget::GdbOptionsPageWidget(QWidget *parent) "of debug information such as /usr/src/debug " "when starting GDB.")); + // #fixme: 2.7 Move to common settings page. checkBoxBreakOnWarning = new QCheckBox(groupBoxGeneral); checkBoxBreakOnWarning->setText(CommonOptionsPage::msgSetBreakpointAtFunction("qWarning")); checkBoxBreakOnWarning->setToolTip(CommonOptionsPage::msgSetBreakpointAtFunctionToolTip("qWarning"));