neobbo/autodebug.sh
2026-02-02 17:42:52 +01:00

18 lines
387 B
Bash
Executable file

#!/bin/bash
# how it works:
# Args are fed to QEMU, then GDB and everything else does shit automagically
# 1st arg: terminal name to spawn GDB
# 2nd arg: place to breakpoint in
# 3rd+ arguments all get passed to QEMU
termname=$1
breakpoint=$2
shift 2
qemu-system-x86_64 -s -S "$@" &
sleep 1
"$termname" -e gdb -ex 'target remote localhost:1234' -ex 'break _start' build/Neobbo.elf