]> Zhao Yanbai Git Server - kernel.git/commitdiff
debug script
authoracevest <zhaoyanbai@126.com>
Tue, 16 May 2023 07:55:49 +0000 (15:55 +0800)
committeracevest <zhaoyanbai@126.com>
Tue, 16 May 2023 07:55:49 +0000 (15:55 +0800)
gdbscript
qemu.sh

index e4101cd7b8bd96b110e760e79331436ee16ab367..c8c22183f9dfb7d8fb5eeca44e773b9cfa6510b5 100644 (file)
--- a/gdbscript
+++ b/gdbscript
@@ -1,2 +1,3 @@
 target remote localhost:1234
-file KERNEL.BIN
+b setup_kernel
+c
diff --git a/qemu.sh b/qemu.sh
index 84f8d024727d31a1439cbef1c6041e86eec9692f..83cecf8a7d46b0c04e6ede1e847ed3f413cd7303 100755 (executable)
--- a/qemu.sh
+++ b/qemu.sh
@@ -5,13 +5,16 @@ qemu-system-i386 \
     -s -S \
     &
 
+#    -device ich9-ahci,id=ahci \
+#    -machine accel=tcg \
+#    -serial stdio \
 #qemu-system-x86_64 -boot d -s -S -drive file=HD.IMG,format=raw,index=0,media=disk -drive file=kernel.iso,index=1,media=cdrom &
 #
 
 pid=$!
 echo "pid is ${pid}"
 
-i386-elf-gdb -x gdbscript; kill -9 $pid
+i386-elf-gdb KERNEL.BIN -x gdbscript; kill -9 $pid
 
 echo "kill pid ${pid}"