Debugger now stops on undefined opcodes, as well as on unknown I/O accesses
This commit is contained in:
parent
3a7b769fa3
commit
c14f919f4f
5 changed files with 232 additions and 195 deletions
|
|
@ -1607,6 +1607,37 @@ if (DEBUGGER) {
|
|||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* stopInstruction()
|
||||
*
|
||||
* TODO: Currently, the only way to prevent this call from stopping the CPU is when you're single-stepping.
|
||||
*
|
||||
* @this {DebuggerPDP11}
|
||||
* @return {boolean} true if stopping is enabled, false if not
|
||||
*/
|
||||
DebuggerPDP11.prototype.stopInstruction = function()
|
||||
{
|
||||
var cpu = this.cpu;
|
||||
if (cpu.isRunning()) {
|
||||
cpu.setPC(this.cpu.getLastPC());
|
||||
this.stopCPU();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* undefinedInstruction(opCode)
|
||||
*
|
||||
* @this {DebuggerPDP11}
|
||||
* @param {number} opCode
|
||||
*/
|
||||
DebuggerPDP11.prototype.undefinedInstruction = function(opCode)
|
||||
{
|
||||
this.printMessage("undefined opcode " + this.toStrBase(opCode), true, true);
|
||||
this.stopInstruction(); // allow the caller to step over it if they really want a trap generated
|
||||
};
|
||||
|
||||
/**
|
||||
* checkMemoryRead(addr, nb)
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue