diff options
author | Himbeer <himbeer@disroot.org> | 2024-09-05 13:45:52 +0200 |
---|---|---|
committer | Himbeer <himbeer@disroot.org> | 2024-09-05 13:45:52 +0200 |
commit | 00cedaa996ad6c6f36b22d42a3b3000a7d30df14 (patch) | |
tree | 3470c833ec9bd2b020b21e58f242f3076c2e0895 | |
parent | c9dc7f17a33c87cb671f5313931438643ae6e4e0 (diff) |
Add test program runner script
-rwxr-xr-x | scripts/run.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/run.sh b/scripts/run.sh new file mode 100755 index 0000000..a6e6b62 --- /dev/null +++ b/scripts/run.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +GDB="gdb" + +go run . < "$1" | qbe | as -o /tmp/test.o +ld -o /tmp/test -I /lib64/ld-linux-x86-64.so.2 -lc /lib/crt1.o /tmp/test.o +/tmp/test +echo "Exit code: $?" +echo "disassemble main" | ${GDB} /tmp/test |