diff options
| author | Matt Borgerson <contact@mborgerson.com> | 2019-12-17 20:02:41 -0700 |
|---|---|---|
| committer | Matt Borgerson <contact@mborgerson.com> | 2019-12-17 20:21:09 -0700 |
| commit | e417c6750982fbc2e0bee29f5808ef9e78564a6e (patch) | |
| tree | d113ff5bfa1607f58d384670974b6e4d65399c4e | |
| parent | 77eb93ce4eaf9667e1261fa7be0a9e9f8cc4d949 (diff) | |
| download | gdbstub-e417c6750982fbc2e0bee29f5808ef9e78564a6e.tar.gz | |
Add smoketest script based on demo
| -rw-r--r-- | smoketest.gdbinit | 15 | ||||
| -rwxr-xr-x | smoketest.sh | 16 |
2 files changed, 31 insertions, 0 deletions
diff --git a/smoketest.gdbinit b/smoketest.gdbinit new file mode 100644 index 0000000..8560b5a --- /dev/null +++ b/smoketest.gdbinit @@ -0,0 +1,15 @@ +set pagination off +symbol-file gdbstub.elf +target remote 127.0.0.1:1234 +b simple_loop +c + +# Step twice and check value of `x` variable +s 2 +if x == 0xdeadbeef + printf "PASS\n" + quit 0 +else + printf "FAIL\n" + quit 1 +end diff --git a/smoketest.sh b/smoketest.sh new file mode 100755 index 0000000..6a46438 --- /dev/null +++ b/smoketest.sh @@ -0,0 +1,16 @@ +#!/bin/bash -x +echo "Launching QEMU" +qemu-system-i386 \ + -serial tcp:127.0.0.1:1234,server \ + -display none \ + -kernel gdbstub.bin & +sleep 1 + +echo "Running GDB" +gdb --command smoketest.gdbinit +RESULT=$? + +echo "Terminating QEMU" +killall qemu-system-i386 + +exit $RESULT |
