2

I use Gdb to trace the execution (breakpoint, single stepping, ...) of a hypervisor OS in Qemu and it works fine so far.

qemu-system-x86_64 -enable-kvm -display sdl -cpu host -serial my: stdio -m 8192 --bios ../../tool/boot/tianocore.bin -drive format = raw, file = var / run /hypervisor.img -machine q35 -s -S
gdb path/to/hypervisor
target remote: 1234

Now, I need to trace the execution of a guest OS in the hypervisor, all run by Qemu. And it does not work. Yet I added the debugging symbols files related to the OS and I also modified the architecture of the instructions.

add-symbol-file ~ / Tinycore / vmlinux 0x100000
add-symbol-file bin / munich 0x18000
set architecture i386: x64_32 // because the guest OS is compiled in 32 bits

But when execution passes the instructions vmresume, vmlauch and continues in the guest OS, Gdb gets confused, single-stepping does not work anymore and breakpoints end up at uncertain addresses.
Does anyone have an idea of ​​what I missed?
Or is it really impossible?
Is there another way to achieved this?
The hypervisor I'm working on is Genode and the guest OS is Tinycore Linux.


  1. munich is a 32 bits bootloader used to boot the Tinycore Linux.
  2. hypervisor, vmlinux and munich are the binaries compiled with debugging symbols.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.