Commit Graph

6 Commits

Author SHA1 Message Date
4ce206f40d Debugger improvements (#11)
- Added selection and CTRL+C to copy lines.
    - Supports selection ranges larger than the ListView; scroll and Shift+Click to select all text from the anchor to the click location (even across multiple pages).
    - Scroll-on-select would be nice to have, but it is not implemented here.
    - Keyboard selection would also be nice. Shift + arrows/page up/page down seems like it would be a decent UX... TBD.
    - Right click to copy + deselect. Or hold left click and press Esc or right click to deselect without copying.
- Added support for scrolling with the mouse wheel.
- Added support for scrolling with the keyboard when the ListView has focus.
- Added support for scrolling with the scrollbar thumb.
- Switched to a fixed-width font for better readability.
- Show OpCodes (instruction bytes).
- Increased the window size to accommodate the better font and OpCode column.
- Normalized all instructions to lowercase.
- New colors to represent instruction state:
    - Red: Breakpoint
    - Green + outline: Current PC
    - Orange + outline: Current PC + breakpoint
    - Blue background: Selection highlight
- Fix watchpoint access size checks so they don't have to be an exact match on the address.
- Minor bug fixes.
2023-08-19 16:29:31 +02:00
15e8aa4500 Toggle breakpoints by double clicking the list (#21) 2023-08-19 16:29:31 +02:00
5b99d9ecbf Memory viewer improvements (#5)
This is a fairly major refactor to the memory viewer.

Contextual coloring follows the precedent set by the cheat search, with red indicating a value has decreased, and green indicates an increase. New here are colors for watchpoints, which use an underlined font: Magenta = write, blue = read, violet = read/write.

The primary changes are listed below:

- Disabled column resizing.
- Removed the useless close button.
- Added auto refresh thread to redraw the memory view every 150ms.
- Added support for scrolling with the mouse wheel.
- Added contextual coloring.
- Fixed garbage in the ASCII view.
- Fixed some styling issues.
- Default address is 0x80000000
2023-08-19 16:29:31 +02:00
0a23a36b29 Improve CPU trapping for watchpoints
Block the CPU thread when a watchpoint is hit. This moves the blocking
to just before the memory access happens. Allows removing the gross
hacks that changed CPU interpreter flow control.

Removes unnecessary double-watchpoint checks in LD and SD instructions.
2023-08-19 16:29:30 +02:00
43ed439a46 Switch watchpoint data structure to C++ unordered_map (#1)
- Removes the need for linking with MFC libraries
- Probably improves performance slightly, assuming the C++ standard
  performs better than MFC.
2023-08-19 16:29:30 +02:00
d58bed9d06 Watchpoint support
- Watchpoints are added in the breakpoints dialog.
- "Exec" is a breakpoint.
- "Read", "Write", and "Read/Write" are watchpoints.
2023-08-19 16:29:30 +02:00