mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -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) {
|
||||
this.controlFlow = controlFlow;
|
||||
this.index = 0;
|
||||
this.index = index;
|
||||
}
|
||||
|
||||
public boolean hasNext() {
|
||||
|
@ -39,7 +39,10 @@ public class FunctionControlFlowIterator {
|
|||
}
|
||||
|
||||
public void rewind(int index) {
|
||||
this.index = index;
|
||||
if (this.index != index) {
|
||||
this.index = index;
|
||||
fill();
|
||||
}
|
||||
}
|
||||
|
||||
private void fill() {
|
||||
|
|
|
@ -176,7 +176,7 @@ public class StepLocationsFinder {
|
|||
breakpointAddresses.add(point.address + debugInfo.offset());
|
||||
return;
|
||||
}
|
||||
if (enterMethod) {
|
||||
if (enterMethod && point.isCall) {
|
||||
breakpointAddresses.add(point.address + debugInfo.offset());
|
||||
callAddresses.add(point.address + debugInfo.offset());
|
||||
}
|
||||
|
|
|
@ -967,6 +967,7 @@ class WasmBinaryRenderingVisitor implements WasmExpressionVisitor {
|
|||
emitLocation(null);
|
||||
flushLocation();
|
||||
if (debugLines != null) {
|
||||
debugLines.advance(writer.getPosition() + addressOffset);
|
||||
debugLines.end();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user