test: changement de deboggeur pour GDB+Dashboard modifié

This commit is contained in:
Nicolas Hordé 2019-01-11 14:25:48 +01:00
parent 9da86c9057
commit 56a7665e69
7 changed files with 1639 additions and 10 deletions

View File

@ -59,6 +59,11 @@ ordinateur (http://www.linuxmint.com/edition.php?id=259).
Les numéros de version des logiciels sont données à titre indicatif car il est fort probable que Les numéros de version des logiciels sont données à titre indicatif car il est fort probable que
cela fonctionne parfaitement avec d'autres versions antérieures. cela fonctionne parfaitement avec d'autres versions antérieures.
Je conseille l'usage du debogueur GDB avec l'ajout de GDB dashboard - Modular visual interface for
GDB in Python.qui permet de visualiser le contenu des registres CPU en permanence.
#
# https://github.com/cyrus-and/gdb-dashboard
Compilation: Compilation:
Nom | Paquet | Version Nom | Paquet | Version
@ -73,7 +78,7 @@ Nom | Paquet | Version
--- | --- | --- --- | --- | ---
fuse-umfuse-ext2 | fuseext2 | 0.4 29 fuse-umfuse-ext2 | fuseext2 | 0.4 29
fusefat | fusefat | 0.1a-1.1 fusefat | fusefat | 0.1a-1.1
CGDB: a curses debugger | cgdb | 0.6.7 GDB | gdb | 8.1.0.20180409-git
QEMU emulator | qemu | 2.5.0 QEMU emulator | qemu | 2.5.0
OVMF | ovmf | 0~20160408.ffea0a2c-2 OVMF | ovmf | 0~20160408.ffea0a2c-2
hexdump | bsdmainutils | 9.0.6 hexdump | bsdmainutils | 9.0.6

1611
debug/.gdbinit Normal file

File diff suppressed because it is too large Load Diff

View File

@ -4,5 +4,3 @@ set architecture i8086
break *0x7c00 break *0x7c00
cont cont
clear *0x7c00 clear *0x7c00
layout asm
layout regs

7
debug/kernel.txt Normal file
View File

@ -0,0 +1,7 @@
target remote localhost:1234
set disassembly-flavor intel
set architecture i8086
symbol-file ./system/realmode/setup.sym
break *0x90000
break *0x90200
cont

View File

@ -3,5 +3,4 @@ set disassembly-flavor intel
set architecture i8086 set architecture i8086
break *0x800 break *0x800
cont cont
display/20i $pc+$cs*16
clear *0x800 clear *0x800

View File

@ -5,4 +5,3 @@ symbol-file ./system/system.sys
break system.c:50 break system.c:50
cont cont
clear system.c:50 clear system.c:50
display/20i $pc

View File

@ -35,7 +35,8 @@ harddisk: final/harddisk.img.final
uefi: final/harddiskuefi.img.final uefi: final/harddiskuefi.img.final
install: install:
(sudo apt-get install gcc qemu fusefat fuseext2 cgdb ovmf bsdmainutils tar bsdmainutils indent binutils bochs bochs-x bochsbios dos2unix) (sudo apt-get install gcc qemu fusefat fuseext2 gdb ovmf bsdmainutils tar bsdmainutils indent binutils bochs bochs-x bochsbios dos2unix)
cp ./debug/.gdbinit ~/
togit: togit:
make -C system togit make -C system togit
@ -47,6 +48,7 @@ togit:
sync sync
clean: clean:
rm -f .gdb_history
make -C system clean make -C system clean
make -C lib clean make -C lib clean
make -C final clean make -C final clean
@ -92,21 +94,29 @@ debug64: debug-system64
redebug64: littleclean debug-system64 redebug64: littleclean debug-system64
kernel: debug-kernel
debug-boot: programs bits32 harddisk qemu-debug debug-boot: programs bits32 harddisk qemu-debug
(sleep 2;cgdb -x ./debug/boot.txt) (sleep 2;gdb -x ./debug/boot.txt)
debug-loader: programs bits32 harddisk qemu-debug debug-loader: programs bits32 harddisk qemu-debug
(sleep 2;cgdb -x ./debug/loader.txt) (sleep 2;gdb -x ./debug/loader.txt)
debug-system: programs bits32 harddisk qemu-debug debug-system: programs bits32 harddisk qemu-debug
(sleep 2;cgdb -x ./debug/system.txt) (sleep 2;gdb -x ./debug/system.txt)
debug-system64: programs bits64 uefi qemu-debug64 debug-system64: programs bits64 uefi qemu-debug64
(sleep 2;cgdb -x ./debug/system.txt) (sleep 2;gdb -x ./debug/system.txt)
debug-kernel: all qemu-kernel
(sleep 2;gdb -x ./debug/kernel.txt)
bochs-debug: bochs-debug:
(killall bochs-debug;bochs -f ./debug/config.bochs) (killall bochs-debug;bochs -f ./debug/config.bochs)
qemu-kernel:
(killall qemu-system-i386;qemu-system-i386 -m 1G -kernel ./system/system.sys -s -S &)
qemu-debug: qemu-debug:
(killall qemu-system-i386;qemu-system-i386 -m 1G -drive format=raw,file=./final/harddisk.img.final -s -S &) (killall qemu-system-i386;qemu-system-i386 -m 1G -drive format=raw,file=./final/harddisk.img.final -s -S &)