mgba icon indicating copy to clipboard operation
mgba copied to clipboard

Debugger: Add range watchpoints

Open bigfarts opened this issue 2 years ago • 0 comments

These are accessible via the following new CLI debugger commands:

  • rw: watchr minAddr maxAddr [cond]
  • r: watchr/r minAddr maxAddr [cond]
  • w: watchr/w minAddr maxAddr [cond]
  • c: watchr/c minAddr maxAddr [cond]

This also makes all watchpoints range watchpoints under the hood.

Preliminary benchmark results:

Time taken to run 10000 frames of Megaman Battle Network 1 (U) with a write watchpoint set at 0x02000000 in milliseconds, 10 runs each:

control (no watchpoint): [4184, 4185, 4197, 4207, 4220, 4178, 4304, 4226, 4234, 4292] mean = 4223, stdev = 43.95

old (single address watchpoint): [4743, 4685, 4679, 4670, 4782, 4704, 4698, 4875, 4746, 4718] mean = 4730, stdev = 61.67

new (range watchpoint): [4683, 4691, 4693, 4706, 4782, 4674, 4746, 4768, 4770, 4776] mean = 4728, stdev = 43.36

bigfarts avatar Aug 11 '22 06:08 bigfarts