Debugger: Do not add CrtDbgReport breakpoints for vc19

The symbol isn't safely resolvable and can lead to unwanted breaks.

Task-number: QTCREATORBUG-19628
Change-Id: Iaa58b12cb826a9e20faa64454e806ecab9d613f3
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2018-01-23 12:55:31 +01:00
parent 4947781bba
commit 01bc302c48

View File

@@ -649,12 +649,17 @@ void CdbEngine::runEngine()
// else the debugger will slow down considerably. // else the debugger will slow down considerably.
const auto cb = [this](const DebuggerResponse &r) { handleBreakInsert(r, BreakpointModelId()); }; const auto cb = [this](const DebuggerResponse &r) { handleBreakInsert(r, BreakpointModelId()); };
if (boolSetting(CdbBreakOnCrtDbgReport)) { if (boolSetting(CdbBreakOnCrtDbgReport)) {
const QString module = msvcRunTime(runParameters().toolChainAbi.osFlavor()); Abi::OSFlavor flavor = runParameters().toolChainAbi.osFlavor();
const QString debugModule = module + 'D'; // CrtDebugReport can not be safely resolved for vc 19
const QString wideFunc = QString::fromLatin1(CdbOptionsPage::crtDbgReport).append('W'); if ((flavor > Abi::WindowsMsvc2005Flavor && flavor <= Abi::WindowsMsvc2013Flavor) ||
runCommand({breakAtFunctionCommand(QLatin1String(CdbOptionsPage::crtDbgReport), module), BuiltinCommand, cb}); flavor > Abi::WindowsMSysFlavor || flavor <= Abi::WindowsCEFlavor) {
runCommand({breakAtFunctionCommand(wideFunc, module), BuiltinCommand, cb}); const QString module = msvcRunTime(flavor);
runCommand({breakAtFunctionCommand(QLatin1String(CdbOptionsPage::crtDbgReport), debugModule), BuiltinCommand, cb}); const QString debugModule = module + 'D';
const QString wideFunc = QString::fromLatin1(CdbOptionsPage::crtDbgReport).append('W');
runCommand({breakAtFunctionCommand(QLatin1String(CdbOptionsPage::crtDbgReport), module), BuiltinCommand, cb});
runCommand({breakAtFunctionCommand(wideFunc, module), BuiltinCommand, cb});
runCommand({breakAtFunctionCommand(QLatin1String(CdbOptionsPage::crtDbgReport), debugModule), BuiltinCommand, cb});
}
} }
// if (boolSetting(BreakOnWarning)) { // if (boolSetting(BreakOnWarning)) {
// runCommand({"bm /( QtCored4!qWarning", BuiltinCommand}); // 'bm': All overloads. // runCommand({"bm /( QtCored4!qWarning", BuiltinCommand}); // 'bm': All overloads.