trace guest OS execution in qemu

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
parfait
Posts: 15
Joined: Sat Dec 14, 2013 12:33 pm

trace guest OS execution in qemu

Post 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)?
parfait
Posts: 15
Joined: Sat Dec 14, 2013 12:33 pm

Re: trace guest OS execution in qemu

Post by parfait »

The cause of the problem: Too old version of qemu
Post Reply