Skip to content

Commit d2dd2cb

Browse files
committed
Rename gdbstub to gdb-server and user args[1] as filename + minor cleanup
1 parent c8dbf19 commit d2dd2cb

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/main/java/be/ugent/topl/mio/GdbStub.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -300,14 +300,10 @@ else if (pkt.startsWith("stackInfo")) {
300300
case "s":
301301
log("Received step command from lldb");
302302
debugger.stepInto();
303-
//sendPacket(out, "T05thread:1;pc:" + toHex(getCurrentState().getPc()) + ";");
304-
//sendPacket(out, "S05");
305303
sendStopPacket(out, "05");
306304
break;
307305
case "c":
308-
// Pretend to run, then stop immediately
309306
debugger.run();
310-
//sendPacket(out, "S05");
311307
break;
312308
case "pause":
313309
debugger.pause();
@@ -321,7 +317,7 @@ else if (pkt.startsWith("stackInfo")) {
321317
break;
322318
default:
323319
System.out.println("Unknown packet: " + pkt);
324-
sendPacket(out, ""); // unsupported
320+
sendPacket(out, "");
325321
break;
326322
}
327323
}

src/main/kotlin/be/ugent/topl/mio/Main.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,9 @@ fun main(args: Array<String>) {
151151
config.port!!
152152
)
153153
}
154-
"gdbstub" -> {
155-
//val wasmFilename = "main.wasm"
156-
val wasmFilename = "tmp/test-dbg.wasm"
154+
"debug-server" -> {
155+
expectNArguments(args, 2)
156+
val wasmFilename = args[1]
157157
val debugger = Debugger(ProcessConnection(config.wdcliPath, wasmFilename, "--no-socket", "--paused"))
158158
debugger.pause()
159159
debugger.setSnapshotPolicy(Debugger.SnapshotPolicy.Checkpointing())

0 commit comments

Comments
 (0)