Single stepping a bhyve guest on AMD64
Robert Crowston
crowston at protonmail.com
Sun May 31 17:10:31 UTC 2020
I am investigating using the -G flag to attach gdb to a running guest machine.
It looks like breakpoints and single instruction stepping are not implemented in vmm/amd/svm.c. It seems that it was added to vmm/intel/vmx.c. I spent a little bit of time reading through the AMD64 Architecture Manual; it doesn't seem to provide a direct way to implement this in a way transparent to the guest?
One way to implement single stepping that occurs to me is to set the trap flag in the guest's RFLAGS register, and then intercept each #DB exception in the vmm.
Has anyone looked at this on the AMD side? Any advice?
---
Rob Crowston.
More information about the freebsd-virtualization
mailing list