feature (build system): added 'debug' mode to run script

This commit is contained in:
antifallobst 2023-02-09 13:27:19 +01:00
parent d751d35a71
commit 5d0a55e35f
1 changed files with 10 additions and 1 deletions

11
run.sh Normal file → Executable file
View File

@ -3,12 +3,21 @@
EMUFLAGS="-no-reboot -m 256M -cdrom build/noxos.iso -chardev stdio,id=log,logfile=noxos.log -serial chardev:log" EMUFLAGS="-no-reboot -m 256M -cdrom build/noxos.iso -chardev stdio,id=log,logfile=noxos.log -serial chardev:log"
emulate() { emulate() {
echo "<=====| Emulating with disabled debug mode |=====>"
qemu-system-x86_64 $EMUFLAGS qemu-system-x86_64 $EMUFLAGS
} }
# qemu will wait for gdb to connect, before booting # qemu will wait for gdb to connect, before booting
emulate_debug() { emulate_debug() {
echo "<=====| Emulating in debug mode |=====>"
qemu-system-x86_64 -s -S $EMUFLAGS qemu-system-x86_64 -s -S $EMUFLAGS
} }
emulate_debug case $1 in
"debug")
emulate_debug
;;
*)
emulate
;;
esac