mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2025-01-08 07:54:11 -08:00
Wasm: fix bugs in debugger
This commit is contained in:
parent
fb39de72cc
commit
506a9bd8c5
|
@ -26,7 +26,7 @@ public class FunctionControlFlowIterator {
|
||||||
|
|
||||||
FunctionControlFlowIterator(FunctionControlFlow controlFlow, int index) {
|
FunctionControlFlowIterator(FunctionControlFlow controlFlow, int index) {
|
||||||
this.controlFlow = controlFlow;
|
this.controlFlow = controlFlow;
|
||||||
this.index = 0;
|
this.index = index;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasNext() {
|
public boolean hasNext() {
|
||||||
|
@ -39,7 +39,10 @@ public class FunctionControlFlowIterator {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void rewind(int index) {
|
public void rewind(int index) {
|
||||||
this.index = index;
|
if (this.index != index) {
|
||||||
|
this.index = index;
|
||||||
|
fill();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void fill() {
|
private void fill() {
|
||||||
|
|
|
@ -176,7 +176,7 @@ public class StepLocationsFinder {
|
||||||
breakpointAddresses.add(point.address + debugInfo.offset());
|
breakpointAddresses.add(point.address + debugInfo.offset());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (enterMethod) {
|
if (enterMethod && point.isCall) {
|
||||||
breakpointAddresses.add(point.address + debugInfo.offset());
|
breakpointAddresses.add(point.address + debugInfo.offset());
|
||||||
callAddresses.add(point.address + debugInfo.offset());
|
callAddresses.add(point.address + debugInfo.offset());
|
||||||
}
|
}
|
||||||
|
|
|
@ -967,6 +967,7 @@ class WasmBinaryRenderingVisitor implements WasmExpressionVisitor {
|
||||||
emitLocation(null);
|
emitLocation(null);
|
||||||
flushLocation();
|
flushLocation();
|
||||||
if (debugLines != null) {
|
if (debugLines != null) {
|
||||||
|
debugLines.advance(writer.getPosition() + addressOffset);
|
||||||
debugLines.end();
|
debugLines.end();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user