Implementing breakpoint condition evaluator
This commit is contained in:
parent
53faa1193a
commit
2df99895fa
|
@ -50,6 +50,16 @@ public class Main {
|
||||||
|
|
||||||
// Begin application operations
|
// Begin application operations
|
||||||
new App(useNative);
|
new App(useNative);
|
||||||
|
|
||||||
|
/*
|
||||||
|
var brk = new Breakpoint();
|
||||||
|
String exp = "([sp - 8] & 3) << 6 != 12.0 + r6 * ecr && [0x0500008C + r8] == 0";
|
||||||
|
System.out.println(exp);
|
||||||
|
if (brk.setCondition(exp))
|
||||||
|
System.out.println(brk.debug());
|
||||||
|
else System.out.println(brk.getErrorCode() + "\t" +
|
||||||
|
brk.getErrorPosition() + ":" + brk.getErrorText());
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1114,7 +1114,7 @@ this.cycles = 0; // DEBUG: Stop processing after execute
|
||||||
|
|
||||||
// Trap
|
// Trap
|
||||||
private void TRAP() {
|
private void TRAP() {
|
||||||
exception.code = 0xFFA0 | inst.imm & 15;
|
exception.code = 0xFFA0 | inst.imm & 31;
|
||||||
pc += 2;
|
pc += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -91,6 +91,12 @@ class JavaVUE extends VUE {
|
||||||
return Math.max(0, maxCycles);
|
return Math.max(0, maxCycles);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Evaluate the condition in a breakpoint
|
||||||
|
public boolean evaluate(Breakpoint brk) {
|
||||||
|
return brk != null ? false :
|
||||||
|
brk.evaluate(this, new int[brk.depth() * 2]);
|
||||||
|
}
|
||||||
|
|
||||||
// Retrieve the application break code
|
// Retrieve the application break code
|
||||||
public int getBreakCode() {
|
public int getBreakCode() {
|
||||||
return breakCode;
|
return breakCode;
|
||||||
|
|
|
@ -29,6 +29,9 @@ class NativeVUE extends VUE {
|
||||||
// Process the simulation
|
// Process the simulation
|
||||||
public native int emulate(int maxCycles);
|
public native int emulate(int maxCycles);
|
||||||
|
|
||||||
|
// Evaluate the condition in a breakpoint
|
||||||
|
public native boolean evaluate(Breakpoint brk);
|
||||||
|
|
||||||
// Retrieve the application break code
|
// Retrieve the application break code
|
||||||
public native int getBreakCode();
|
public native int getBreakCode();
|
||||||
|
|
||||||
|
|
|
@ -173,6 +173,9 @@ public abstract class VUE {
|
||||||
// Process the simulation
|
// Process the simulation
|
||||||
public abstract int emulate(int maxCycles);
|
public abstract int emulate(int maxCycles);
|
||||||
|
|
||||||
|
// Evaluate the condition in a breakpoint
|
||||||
|
public abstract boolean evaluate(Breakpoint brk);
|
||||||
|
|
||||||
// Retrieve the application break code
|
// Retrieve the application break code
|
||||||
public abstract int getBreakCode();
|
public abstract int getBreakCode();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue