Commit 9e10e11c authored by Friedemann Kleint's avatar Friedemann Kleint

CDB: Add further checking to avoid invalid set asserts.

Clear a failed call. _HAS_ITERATOR_DEBUGGING can unfortunately
not be turned off as it is not binary compatible with other code.
parent 077c19a6
......@@ -3178,6 +3178,14 @@ static void qDumpStdSetHelper(QDumper &d)
const int nn = set.size();
if (nn < 0)
#ifdef Q_CC_MSVC
// This set has a head element pointer:
// "{ base class ; HeadType *_MyHead ; unsigned int _MySize }",
// which is valid even if the set is empty. Check that to avoid iterator asserts.
const void *headPtrAddress = addOffset(&set, sizeof(DummyType) - sizeof(unsigned int) - sizeof(void*));
if (const void *headPtr = deref(headPtrAddress))
Q_TYPENAME DummyType::const_iterator it = set.begin();
const Q_TYPENAME DummyType::const_iterator cend = set.end();
for (int i = 0; i < nn && i < 10 && it != cend; ++i, ++it)
This diff is collapsed.
......@@ -563,8 +563,14 @@ CdbDumperHelper::CallResult
if (!writeToDebuggee(m_cif->debugDataSpaces, inBuffer, m_inBufferAddress, errorMessage))
return CallFailed;
if (!CdbDebugEnginePrivate::executeDebuggerCommand(m_cif->debugControl, callCmd, errorMessage))
if (!CdbDebugEnginePrivate::executeDebuggerCommand(m_cif->debugControl, callCmd, errorMessage)) {
// Clear the outstanding call in case we triggered a debug library assert with a message box
QString clearError;
if (!CdbDebugEnginePrivate::executeDebuggerCommand(m_cif->debugControl, QLatin1String(".call /c"), &clearError)) {
*errorMessage += QString::fromLatin1("/Unable to clear call %1").arg(clearError);
return CallSyntaxError;
// Set up call and a temporary breakpoint after it.
// Try to skip debuggee crash exceptions and dumper exceptions
// by using 'gN' (go not handled -> pass handling to dumper __try/__catch block)
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