0

I am trying to debug my kernel, and QEMU does not work when specifying the -S flag, for example:

qemu-system-x86_64 -kernel build/boot/TinyKernel.elf -m 256M -S -s

When trying, I get the Guest has not initialized the display (yet). screen, and it is really confusing. I have been all around, trying to figure out why it is doing this, and I just can't figure it out. My only guess is that it has no longer the same functionality with the current version of QEMU I am using (5.2.0).

Does anybody know why this issue is occurring, and how to fix it?

Thanks!

1 Answer 1

0

-S says "don't actually start running the guest". So it is expected that nothing happens, and in particular that the guest hasn't done anything to program the graphics device to display anything. QEMU is waiting for you to attach a debugger to the gdb stub, and then tell QEMU to start via gdb's "continue" command.

(It is also possible to start the guest via a monitor command, but generally if you're using '-s' to enable the gdb stub you used '-S' to give you a chance to connect gdb before running the guest, and therefore via gdb is the straightforward way to start the guest.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .