| 1000 | } |
| 1001 | |
| 1002 | void MainWindow::breakAddGui() { |
| 1003 | uint32_t address = static_cast<uint32_t>(hex2int(m_disasm->getSelectedAddr())); |
| 1004 | |
| 1005 | QTextCursor c = m_disasm->textCursor(); |
| 1006 | c.setCharFormat(m_disasm->currentCharFormat()); |
| 1007 | |
| 1008 | m_guiAdd = true; |
| 1009 | |
| 1010 | breakAdd(breakNextLabel(), address, true, true, false); |
| 1011 | |
| 1012 | m_guiAdd = false; |
| 1013 | |
| 1014 | int32_t base = disasm.base; |
| 1015 | int32_t next = disasm.next; |
| 1016 | |
| 1017 | disasm.base = address; |
| 1018 | disasm.highlight.breakP = false; |
| 1019 | disasmGet(); |
| 1020 | disasm.base = base; |
| 1021 | disasm.next = next; |
| 1022 | |
| 1023 | c.movePosition(QTextCursor::StartOfLine, QTextCursor::MoveAnchor); |
| 1024 | c.setPosition(c.position()+9, QTextCursor::MoveAnchor); |
| 1025 | c.deleteChar(); |
| 1026 | |
| 1027 | // mark breakpoint |
| 1028 | if (disasm.highlight.breakP) { |
| 1029 | c.insertHtml(QStringLiteral("<b><font color='#800000'>X</font></b>")); |
| 1030 | } else { |
| 1031 | c.insertText(QStringLiteral(" ")); |
| 1032 | } |
| 1033 | |
| 1034 | if (m_disasm->labelCheck()) { |
| 1035 | disasmUpdate(); |
| 1036 | memUpdate(); |
| 1037 | } |
| 1038 | } |
| 1039 | |
| 1040 | bool MainWindow::breakAdd(const QString &label, uint32_t addr, bool enabled, bool toggle, bool unset) { |
| 1041 | const int row = m_breakpoints->rowCount(); |
nothing calls this directly
no test coverage detected