Issue
I want to write my own hypervisor for Intel Platform based on an open project and I want understand how to debug it.
I have real stend to debug on, but it reboots at faults and it is hard to find mistake. I've found I could use QEMU/KVM with nested hypervisor to debug it. May be there are any other variants? VMware is hanging with faults, as I understand. On AMD platforms I have used SimNow. It will be good if the host system will be Windows.
Thank you for advices.
Solution
It depends on your flavor. The couple Qemu/GDB is a good start. Here are some useful hints if your host platform is Intel CPU, you can:
- start qemu like this :
qemu-system-x86_64 -enable-kvm -cpu host -s -S ...
.
Qemu will boot the hypervisor along with its gdbserver and pause it until it receivescontinue
command from gdb. - Start GDB like this:
gdb /path/to/hypervisor
then,target remote :1234
to attach the gdb to the gdbserver - Use
hbreak
instead ofbreak
, but you have only 4 breakpoints left - From this point, you may continue the debugging as for a simple application
Answered By - Mahouk
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.