There seems to be a problem with the Freedos bootloader. (It appears that the bootcode can't find the kernel in certain circumstances.)
So I'm trying to debug the bootloader in qemu with gdb. Following the instructions found on several wiki and freely available online course materials, I run qemu like this
qemu-system-i386 -fda fdboot.img -boot a -s -S
And then connect gdb like this
$ gdb
(gdb) target remote localhost:1234
I can step through the first 10 - 12 instructions with si
which I assume is the SeaBIOS.
But past that, when I try to step into bootloader code, it continues execution without breaking, all the way up to the FreeDos menu prompt. This totally skips the bootloader code which I would like to examine step by step as it is executed.
What do I need to do so that I can step though the bootloader?
[You can download the freedos floppy images from the project website if you want to try yourself.]
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…