| 1389 | } |
| 1390 | |
| 1391 | void MainWindow::watchAddGui() { |
| 1392 | int mask = m_watchGUIMask; |
| 1393 | uint32_t addr = static_cast<uint32_t>(hex2int(m_disasm->getSelectedAddr())); |
| 1394 | |
| 1395 | QTextCursor c = m_disasm->textCursor(); |
| 1396 | c.setCharFormat(m_disasm->currentCharFormat()); |
| 1397 | |
| 1398 | m_guiAdd = true; |
| 1399 | |
| 1400 | watchAdd(watchNextLabel(), addr, addr, mask, true, false); |
| 1401 | |
| 1402 | m_guiAdd = false; |
| 1403 | |
| 1404 | int32_t base = disasm.base; |
| 1405 | int32_t next = disasm.next; |
| 1406 | |
| 1407 | disasm.base = static_cast<int32_t>(addr); |
| 1408 | disasm.highlight.watchR = false; |
| 1409 | disasm.highlight.watchW = false; |
| 1410 | disasmGet(); |
| 1411 | |
| 1412 | disasm.base = base; |
| 1413 | disasm.next = next; |
| 1414 | |
| 1415 | c.movePosition(QTextCursor::StartOfLine, QTextCursor::MoveAnchor); |
| 1416 | c.setPosition(c.position() + 7, QTextCursor::MoveAnchor); |
| 1417 | c.deleteChar(); |
| 1418 | |
| 1419 | // mark read |
| 1420 | if (disasm.highlight.watchR) { |
| 1421 | c.insertHtml(QStringLiteral("<b><font color='#008000'>R</font></b>")); |
| 1422 | } else { |
| 1423 | c.insertText(QStringLiteral(" ")); |
| 1424 | } |
| 1425 | |
| 1426 | c.movePosition(QTextCursor::StartOfLine, QTextCursor::MoveAnchor); |
| 1427 | c.setPosition(c.position()+8, QTextCursor::MoveAnchor); |
| 1428 | c.deleteChar(); |
| 1429 | |
| 1430 | // mark write |
| 1431 | if (disasm.highlight.watchW) { |
| 1432 | c.insertHtml(QStringLiteral("<b><font color='#808000'>W</font></b>")); |
| 1433 | } else { |
| 1434 | c.insertText(QStringLiteral(" ")); |
| 1435 | } |
| 1436 | |
| 1437 | if (m_disasm->labelCheck()) { |
| 1438 | disasmUpdate(); |
| 1439 | memUpdate(); |
| 1440 | } |
| 1441 | } |
| 1442 | |
| 1443 | void MainWindow::watchAddSlot() { |
| 1444 | watchAdd(watchNextLabel(), 0, 0, DBG_MASK_READ | DBG_MASK_WRITE, false, true); |
nothing calls this directly
no test coverage detected