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

@@ -654,7 +654,15 @@ void WatchWindow::setModelData
void WatchWindow::setWatchpoint(quint64 address)
{
breakHandler()->setWatchpointByAddress(address);
BreakpointParameters data(Watchpoint);
data.address = address;
BreakpointId id = breakHandler()->findWatchpoint(data);
if (id) {
qDebug() << "WATCHPOINT EXISTS";
// removeBreakpoint(index);
return;
}
breakHandler()->appendBreakpoint(data);
}
} // namespace Internal