From 04470edcc6bdfa7543624da3b94524410535fb1f Mon Sep 17 00:00:00 2001 From: Nigel Date: Fri, 27 Oct 2023 18:03:45 +0200 Subject: [PATCH] Adding gdb init and adjusting some of the build automation steps --- .gdbinit | 7 +++++++ .gitignore | 2 ++ run.sh | 1 + scripts/create_symbol_lookup.sh | 5 +++-- scripts/run_qemu.sh | 4 ++-- 5 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 .gdbinit diff --git a/.gdbinit b/.gdbinit new file mode 100644 index 0000000..283cb0c --- /dev/null +++ b/.gdbinit @@ -0,0 +1,7 @@ +target remote localhost:1234 + +file root/boot/myos.bin +symbol-file kernel.sym + +break prekernel/prekernel.cpp:18 +continue \ No newline at end of file diff --git a/.gitignore b/.gitignore index 689ffcd..daf06ba 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,5 @@ root/ *.a +/CoreLib/warnings.log +/kernel/warnings.log diff --git a/run.sh b/run.sh index 6013267..20cebe8 100755 --- a/run.sh +++ b/run.sh @@ -17,6 +17,7 @@ if ! make 2> warnings.log 1> /dev/null ; then fi) ./scripts/update_harddrive.sh +./scripts/create_symbol_lookup.sh args=""; if [[ $1 == "-d" ]] diff --git a/scripts/create_symbol_lookup.sh b/scripts/create_symbol_lookup.sh index a150d4a..5d6dd6c 100755 --- a/scripts/create_symbol_lookup.sh +++ b/scripts/create_symbol_lookup.sh @@ -1,3 +1,4 @@ #!/bin/bash - -objcopy --only-keep-debug build/kernel/myos.bin kernel.sym \ No newline at end of file +echo "creating symbols file" +echo $(pwd) +objcopy --only-keep-debug root/boot/myos.bin kernel.sym \ No newline at end of file diff --git a/scripts/run_qemu.sh b/scripts/run_qemu.sh index f728be6..bf9cac3 100755 --- a/scripts/run_qemu.sh +++ b/scripts/run_qemu.sh @@ -2,9 +2,9 @@ if [[ $1 == "debug" ]] then - qemu-system-i386 -boot d -drive format=raw,file=disk.img -serial stdio -vga std -display gtk -m 2G -cpu core2duo -d int -no-shutdown -no-reboot + qemu-system-i386 -s -boot d -drive format=raw,file=disk.img -serial stdio -vga std -display gtk -m 2G -cpu core2duo -d int -no-shutdown -no-reboot else - qemu-system-i386 -boot d -drive format=raw,file=disk.img -serial stdio -vga std -display gtk -m 2G -cpu core2duo + qemu-system-i386 -s -boot d -drive format=raw,file=disk.img -serial stdio -vga std -display gtk -m 2G -cpu core2duo fi # Run from harddisk #qemu-system-i386 -boot d -drive format=raw,file=disk.img -serial stdio -vga std -display gtk -m 2G -cpu core2duo -d int -no-shutdown -no-reboot