Commit 518b6fce authored by Friedemann Kleint's avatar Friedemann Kleint

CDB: Add setting to ignore first-chance exceptions.

- Add setting for command line option -x.

Task-number: QTCREATORBUG-8141

Change-Id: Id53b9d7d207e2e2c86886db9d0a8c9f5348b659b
Reviewed-by: default avatarJoerg Bornemann <joerg.bornemann@digia.com>
parent e7b61089
......@@ -668,6 +668,8 @@ bool CdbEngine::launchCDB(const DebuggerStartParameters &sp, QString *errorMessa
<< QLatin1String(".idle_cmd ") + QString::fromLatin1(m_extensionCommandPrefixBA) + QLatin1String("idle");
if (sp.useTerminal) // Separate console
arguments << QLatin1String("-2");
if (m_options->ignoreFirstChanceAccessViolation)
arguments << QLatin1String("-x");
if (!m_options->symbolPaths.isEmpty())
arguments << QLatin1String("-y") << m_options->symbolPaths.join(QString(QLatin1Char(';')));
if (!m_options->sourcePaths.isEmpty())
......
......@@ -39,13 +39,17 @@ static const char breakFunctionsKeyC[] = "BreakFunctions";
static const char additionalArgumentsKeyC[] = "AdditionalArguments";
static const char cdbConsoleKeyC[] = "CDB_Console";
static const char breakpointCorrectionKeyC[] = "BreakpointCorrection";
static const char ignoreFirstChanceAccessViolationKeyC[] = "IgnoreFirstChanceAccessViolation";
namespace Debugger {
namespace Internal {
const char *CdbOptions::crtDbgReport = "CrtDbgReport";
CdbOptions::CdbOptions() : cdbConsole(false), breakpointCorrection(true)
CdbOptions::CdbOptions()
: cdbConsole(false)
, breakpointCorrection(true)
, ignoreFirstChanceAccessViolation(false)
{
}
......@@ -58,7 +62,8 @@ void CdbOptions::clear()
{
symbolPaths.clear();
sourcePaths.clear();
cdbConsole = false;
breakpointCorrection = true;
cdbConsole = ignoreFirstChanceAccessViolation = false;
breakEvents.clear();
breakFunctions.clear();
}
......@@ -79,6 +84,7 @@ void CdbOptions::fromSettings(QSettings *s)
breakFunctions = s->value(keyRoot + QLatin1String(breakFunctionsKeyC), QStringList()).toStringList();
cdbConsole = s->value(keyRoot + QLatin1String(cdbConsoleKeyC), QVariant(false)).toBool();
breakpointCorrection = s->value(keyRoot + QLatin1String(breakpointCorrectionKeyC), QVariant(true)).toBool();
ignoreFirstChanceAccessViolation = s->value(keyRoot + QLatin1String(ignoreFirstChanceAccessViolationKeyC), false).toBool();
}
void CdbOptions::toSettings(QSettings *s) const
......@@ -91,6 +97,7 @@ void CdbOptions::toSettings(QSettings *s) const
s->setValue(QLatin1String(additionalArgumentsKeyC), additionalArguments);
s->setValue(QLatin1String(cdbConsoleKeyC), QVariant(cdbConsole));
s->setValue(QLatin1String(breakpointCorrectionKeyC), QVariant(breakpointCorrection));
s->setValue(QLatin1String(ignoreFirstChanceAccessViolationKeyC), QVariant(ignoreFirstChanceAccessViolation));
s->endGroup();
}
......@@ -98,6 +105,7 @@ bool CdbOptions::equals(const CdbOptions &rhs) const
{
return cdbConsole == rhs.cdbConsole
&& breakpointCorrection == rhs.breakpointCorrection
&& ignoreFirstChanceAccessViolation == rhs.ignoreFirstChanceAccessViolation
&& additionalArguments == rhs.additionalArguments
&& symbolPaths == rhs.symbolPaths
&& sourcePaths == rhs.sourcePaths
......
......@@ -66,6 +66,8 @@ public:
bool cdbConsole;
// Perform code-model based correction of breakpoint location.
bool breakpointCorrection;
// Add -x to command line.
bool ignoreFirstChanceAccessViolation;
static const char *crtDbgReport;
};
......
......@@ -253,6 +253,7 @@ void CdbOptionsPageWidget::setOptions(CdbOptions &o)
m_ui.additionalArgumentsLineEdit->setText(o.additionalArguments);
setSymbolPaths(o.symbolPaths);
setSourcePaths(o.sourcePaths);
m_ui.ignoreFirstChanceAccessViolationCheckBox->setChecked(o.ignoreFirstChanceAccessViolation);
m_breakEventWidget->setBreakEvents(o.breakEvents);
m_ui.consoleCheckBox->setChecked(o.cdbConsole);
m_ui.breakpointCorrectionCheckBox->setChecked(o.breakpointCorrection);
......@@ -265,6 +266,7 @@ CdbOptions CdbOptionsPageWidget::options() const
rc.additionalArguments = m_ui.additionalArgumentsLineEdit->text().trimmed();
rc.symbolPaths = m_symbolPaths;
rc.sourcePaths = m_sourcePaths;
rc.ignoreFirstChanceAccessViolation = m_ui.ignoreFirstChanceAccessViolationCheckBox->isChecked();
rc.breakEvents = m_breakEventWidget->breakEvents();
rc.cdbConsole = m_ui.consoleCheckBox->isChecked();
rc.breakpointCorrection = m_ui.breakpointCorrectionCheckBox->isChecked();
......
......@@ -137,6 +137,22 @@
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="variousGroupBox">
<property name="title">
<string>Various</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QCheckBox" name="ignoreFirstChanceAccessViolationCheckBox">
<property name="text">
<string>Ignore first chance access violations</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
......
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