Improve error logging of CDB breakpoint setting.

Output warnings to debugger log. Prevent breakpoints from
being set several times when loading session data by
clearing the complete break handler.
Reviewed-by: hjk <qtc-committer@nokia.com>
This commit is contained in:
Friedemann Kleint
2009-06-30 15:50:56 +02:00
parent 640278e1d0
commit e8dafc28a5
5 changed files with 70 additions and 34 deletions

View File

@@ -1182,6 +1182,8 @@ void CdbDebugEngine::selectThread(int index)
void CdbDebugEngine::attemptBreakpointSynchronization()
{
if (!m_d->m_hDebuggeeProcess) // Sometimes called from the breakpoint Window
return;
QString errorMessage;
if (!m_d->attemptBreakpointSynchronization(&errorMessage))
warning(msgFunctionFailed(Q_FUNC_INFO, errorMessage));
@@ -1215,10 +1217,15 @@ bool CdbDebugEnginePrivate::attemptBreakpointSynchronization(QString *errorMessa
return true;
}
return CDBBreakPoint::synchronizeBreakPoints(m_cif.debugControl,
QStringList warnings;
const bool ok = CDBBreakPoint::synchronizeBreakPoints(m_cif.debugControl,
m_cif.debugSymbols,
m_debuggerManagerAccess->breakHandler(),
errorMessage);
errorMessage, &warnings);
if (const int warningsCount = warnings.size())
for (int w = 0; w < warningsCount; w++)
m_engine->warning(warnings.at(w));
return ok;
}
void CdbDebugEngine::reloadDisassembler()