Adding gdb init and adjusting some of the build automation steps

dev
Nigel Barink 2023-10-27 18:03:45 +02:00
parent 2970806705
commit 04470edcc6
5 changed files with 15 additions and 4 deletions

7
.gdbinit Normal file
View File

@ -0,0 +1,7 @@
target remote localhost:1234
file root/boot/myos.bin
symbol-file kernel.sym
break prekernel/prekernel.cpp:18
continue

2
.gitignore vendored
View File

@ -11,3 +11,5 @@ root/
*.a
/CoreLib/warnings.log
/kernel/warnings.log

1
run.sh
View File

@ -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" ]]

View File

@ -1,3 +1,4 @@
#!/bin/bash
objcopy --only-keep-debug build/kernel/myos.bin kernel.sym
echo "creating symbols file"
echo $(pwd)
objcopy --only-keep-debug root/boot/myos.bin kernel.sym

View File

@ -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