debugger: potentia;l cdb compile fix

This commit is contained in:
hjk
2010-11-16 11:12:05 +01:00
parent 694503cc76
commit 0ccba579f6

View File

@@ -1301,20 +1301,20 @@ bool CdbEngine::attemptBreakpointSynchronizationI(QString *errorMessage)
} }
// If there are changes/removals, delete all breakpoints and re-insert // If there are changes/removals, delete all breakpoints and re-insert
// all enabled breakpoints. This is the simplest // all enabled breakpoints. This is the simplest way to apply changes
// way to apply changes since CDB ids shift when removing breakpoints and there is no // since CDB ids shift when removing breakpoints and there is no
// easy way to re-match them. // easy way to re-match them.
if (syncType == BreakpointsRemovedChanged && !deleteCdbBreakpoints(control, errorMessage)) if (syncType == BreakpointsRemovedChanged && !deleteCdbBreakpoints(control, errorMessage))
return false; return false;
foreach (BreakpointId id, ids) { foreach (BreakpointId id, ids) {
BreakpointResponse response; BreakpointResponse response;
const BreakpointData *data = handler->breakpointById(id); const BreakpointParameters &data = handler->breakpointData(id);
errorMessage->clear(); errorMessage->clear();
switch (handler->state(id)) { switch (handler->state(id)) {
case BreakpointInsertRequested: case BreakpointInsertRequested:
handler->setState(id, BreakpointInsertProceeding); handler->setState(id, BreakpointInsertProceeding);
if (addCdbBreakpoint(control, symbols, data->parameters(), &response, errorMessage)) { if (addCdbBreakpoint(control, symbols, data, &response, errorMessage)) {
notifyBreakpointInsertOk(id); notifyBreakpointInsertOk(id);
handler->setResponse(id, response); handler->setResponse(id, response);
} else { } else {
@@ -1323,10 +1323,10 @@ bool CdbEngine::attemptBreakpointSynchronizationI(QString *errorMessage)
} }
break; break;
case BreakpointChangeRequested: case BreakpointChangeRequested:
// Skip disabled breakpoints, else add // Skip disabled breakpoints, else add.
handler->setState(id, BreakpointChangeProceeding); handler->setState(id, BreakpointChangeProceeding);
if (data->isEnabled()) { if (data.enabled) {
if (addCdbBreakpoint(control, symbols, data->parameters(), &response, errorMessage)) { if (addCdbBreakpoint(control, symbols, data, &response, errorMessage)) {
notifyBreakpointChangeOk(id); notifyBreakpointChangeOk(id);
handler->setResponse(id, response); handler->setResponse(id, response);
} else { } else {
@@ -1344,7 +1344,7 @@ bool CdbEngine::attemptBreakpointSynchronizationI(QString *errorMessage)
case BreakpointPending: case BreakpointPending:
// Existing breakpoints were deleted due to change/removal, re-set // Existing breakpoints were deleted due to change/removal, re-set
if (syncType == BreakpointsRemovedChanged if (syncType == BreakpointsRemovedChanged
&& !addCdbBreakpoint(control, symbols, handler->breakpointById(id)->parameters(), &response, errorMessage)) && !addCdbBreakpoint(control, symbols, handler->breakpointData(id), &response, errorMessage))
showMessage(*errorMessage, LogError); showMessage(*errorMessage, LogError);
break; break;
default: default: