Skip to content

Commit 15aea97

Browse files
authored
fix watchpoint/breakpoint label display (#541)
1 parent f37c24e commit 15aea97

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

gui/qt/debugger.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,6 @@ void MainWindow::debugCommand(int reason, uint32_t data) {
468468
return;
469469
}
470470

471-
int row = 0;
472471
uint32_t addr;
473472

474473
// This means the program is trying to send us a debug command. Let's see what we can do with that information
@@ -487,7 +486,7 @@ void MainWindow::debugCommand(int reason, uint32_t data) {
487486

488487
for (int i = 0; i < m_breakpoints->rowCount(); i++) {
489488
if (m_breakpoints->item(i, BREAK_ADDR_COL)->text() == input) {
490-
label = m_breakpoints->item(row, BREAK_NAME_COL)->text();
489+
label = m_breakpoints->item(i, BREAK_NAME_COL)->text();
491490
valid = true;
492491
break;
493492
}
@@ -510,7 +509,7 @@ void MainWindow::debugCommand(int reason, uint32_t data) {
510509
uint32_t low = static_cast<uint32_t>(hex2int(m_watchpoints->item(i, WATCH_LOW_COL)->text()));
511510
uint32_t high = static_cast<uint32_t>(hex2int(m_watchpoints->item(i, WATCH_HIGH_COL)->text()));
512511
if (addr >= low && addr <= high) {
513-
label = m_watchpoints->item(row, WATCH_NAME_COL)->text();
512+
label = m_watchpoints->item(i, WATCH_NAME_COL)->text();
514513
valid = true;
515514
break;
516515
}

0 commit comments

Comments
 (0)