Page 1 of 1

trace guest OS execution in qemu

Posted: Mon Nov 06, 2017 3:15 pm
by parfait
Hello,
I need help on this.
Using gdb and gdbserver, how to trace a guest OS, hosted by a hypervisor, all of them running on qemu?
Currently I boot the system on qemu: qemu-system-x86_64 -enable-kvm -cpu qemu64 -m 3072 -net nic,model=e1000 -serial mon:stdio -hda var/run/hyper.img -s -S
Start gdb with the hypervisor file: gdb hyper
Attach to the gdbserver: target remote :1234

Code: Select all

void resume_vm(){
....
....
pop rax;
vmresume;
}
set breakpoint at (just before launching the virtual machine)

hbreak resume_vm
single-step until =>vmresume;
But for a reason I don't understand, the execution does not step into the virtual machine code.
Can someone explain why it is not possible to single step into the VM code?
How can I make it happen, that is, single - step into the VM code (Guest OS binary code)?

Re: trace guest OS execution in qemu

Posted: Mon Nov 13, 2017 2:57 am
by parfait
The cause of the problem: Too old version of qemu