Skip to content

Commit

Permalink
ui_dbg.h: fix a regression in new disassembler back-scanning (data by…
Browse files Browse the repository at this point in the history
…tes could be skipped)
  • Loading branch information
floooh committed Nov 26, 2023
1 parent d95c904 commit 789d3e1
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions ui/ui_dbg.h
Original file line number Diff line number Diff line change
Expand Up @@ -1589,8 +1589,13 @@ static void _ui_dbg_update_line_array(ui_dbg_t* win, uint16_t addr) {
}
}
#endif
// found an op start
bt_addr = scan_addr;
// found an op start, if any unknown bytes had been skipped, ignore the op
// (it will be found again in the next iteration)
_ui_dbg_disasm(win, scan_addr);
if ((int)(win->dasm_line.num_bytes - 1) == j) {
// ok, no gap bytes, break here with a found op
bt_addr = scan_addr;
}
break;
}
}
Expand Down Expand Up @@ -2016,9 +2021,14 @@ void ui_dbg_disassemble(ui_dbg_t* win, const ui_dbg_dasm_request_t* request) {
}
}
#endif
// found an op start
bt_addr = scan_addr;
is_known_op = true;
// found an op start, if any unknown bytes had been skipped, ignore the op
// (it will be found again in the next iteration)
_ui_dbg_disasm(win, scan_addr);
if ((int)(win->dasm_line.num_bytes - 1) == j) {
// ok, no gap bytes, break with 'found_op' status
bt_addr = scan_addr;
is_known_op = true;
}
break;
}
}
Expand Down

0 comments on commit 789d3e1

Please sign in to comment.