OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 2:00 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: trace guest OS execution in qemu
PostPosted: Mon Nov 06, 2017 3:15 pm 
Offline

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


Top
 Profile  
 
 Post subject: Re: trace guest OS execution in qemu
PostPosted: Mon Nov 13, 2017 2:57 am 
Offline

Joined: Sat Dec 14, 2013 12:33 pm
Posts: 15
The cause of the problem: Too old version of qemu


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 58 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group