debugger: refactor watch point lookup

In preparation of bitfield watch points.
This commit is contained in:
hjk
2011-03-01 19:16:24 +01:00
parent b0b8a452c1
commit 2780ff6f22
6 changed files with 30 additions and 31 deletions

View File

@@ -724,17 +724,21 @@ QVariant WatchModel::data(const QModelIndex &idx, int role) const
return pointerValue(data.value);
return QVariant(quint64(0));
case LocalsIsWatchpointAtAddressRole:
return engine()->breakHandler()
->hasWatchpointAt(data.coreAddress());
case LocalsIsWatchpointAtAddressRole: {
BreakpointParameters bp(Watchpoint);
bp.address = data.coreAddress();
return engine()->breakHandler()->findWatchpoint(bp) != 0;
}
case LocalsAddressRole:
return data.coreAddress();
case LocalsIsWatchpointAtPointerValueRole:
if (isPointerType(data.type))
return engine()->breakHandler()
->hasWatchpointAt(pointerValue(data.value));
if (isPointerType(data.type)) {
BreakpointParameters bp(Watchpoint);
bp.address = pointerValue(data.value);
return engine()->breakHandler()->findWatchpoint(bp) != 0;
}
return false;
default: