Debugging bootloader with gdb in qemu

后端 未结 1 790
天涯浪人
天涯浪人 2020-12-15 09:16

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

相关标签:
1条回答
  • 2020-12-15 09:27

    Works fine here using qemu 1.3 and gdb 7.3.50.20111117 (you didn't say what versions you used). I was able to single step tons of instructions until I got bored and placed a breakpoint to catch the bootloader:

    (gdb) br *0x7c00
    Breakpoint 1 at 0x7c00
    (gdb) c
    Continuing.
    
    Breakpoint 1, 0x00007c00 in ?? ()
    (gdb) x/i $eip
    => 0x7c00:      jmp    0x7c3e
    

    Note that I have set gdb to 16 bit mode first using set architecture i8086.

    0 讨论(0)
提交回复
热议问题