Debugger: Fixed issue with "set next statement" and assembler's "execute" feature

This commit is contained in:
Sour 2018-06-16 17:09:37 -04:00
parent 130b923a0b
commit b3c763a5f3

View file

@ -963,11 +963,14 @@ void Debugger::SetNextStatement(uint16_t addr)
if(_currentReadAddr) { if(_currentReadAddr) {
_cpu->SetDebugPC(addr); _cpu->SetDebugPC(addr);
*_currentReadAddr = addr; *_currentReadAddr = addr;
*_currentReadValue = _memoryManager->DebugRead(addr, true); *_currentReadValue = _memoryManager->DebugRead(addr, false);
} else { } else {
//Can't change the address right away (CPU is in the middle of an instruction) //Can't change the address right away (CPU is in the middle of an instruction)
//Address will change after current instruction is done executing //Address will change after current instruction is done executing
_nextReadAddr = addr; _nextReadAddr = addr;
//Force the current instruction to finish
Step(1);
} }
} }