From: <m97...@us...> - 2011-11-20 12:29:28
|
Revision: 12313 http://openmsx.svn.sourceforge.net/openmsx/?rev=12313&view=rev Author: m9710797 Date: 2011-11-20 12:29:22 +0000 (Sun, 20 Nov 2011) Log Message: ----------- Fixed 'watchpoints don't break immediately' bug. To reproduce simply execute: debug set_watchpoint write_io 0xa1 in MSX-BASIC on a NMS8250, this should stop at address 0x1217 (directly after the 'OUT (#a1),A' instruction. For some strange reason (possibly just (bad) luck) I couldn't reproduce this when using a 'devel' build. With either an 'opt' or even a 'debug' build I could trigger this bug. The problem was that the 'debug break' command didn't force the CPU emulation to exit the fast-emulation loop. 'Typically' this also isn't required: at the time commands are accepted, the CPU emulation loop isn't running. Or in case of breakpoints or debug conditions, the fast cpu loop is never entered. Only for watchpoints this can happen. Fixed by letting the 'debug break' command call CPU::exitCPULoopSync(). Thanks to BiFiMSX for reporting the bug, and insisting there really was a bug even though I couldn't reproduce it at first. Modified Paths: -------------- openmsx/trunk/src/cpu/MSXCPUInterface.cc Modified: openmsx/trunk/src/cpu/MSXCPUInterface.cc =================================================================== --- openmsx/trunk/src/cpu/MSXCPUInterface.cc 2011-11-19 17:56:56 UTC (rev 12312) +++ openmsx/trunk/src/cpu/MSXCPUInterface.cc 2011-11-20 12:29:22 UTC (rev 12313) @@ -939,6 +939,7 @@ assert(!isFastForward()); if (breaked) return; breaked = true; + msxcpu.exitCPULoopSync(); Reactor& reactor = motherBoard.getReactor(); reactor.block(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |