Date: Sun, 31 May 2020 17:10:25 +0000 From: Robert Crowston <crowston@protonmail.com> To: FreeBSD virtualization <freebsd-virtualization@freebsd.org> Subject: Single stepping a bhyve guest on AMD64 Message-ID: <JLXI5eQvGXOFQYyj4zt5c5ghWrorH8PZJrWsVlTQV0hCcOivLLkyjNZLO4yz-HZwHp00kTK6jRjJY81iSb660nRqjZgTBNG7Vk1DMNWNFfY=@protonmail.com>
next in thread | raw e-mail | index | archive | help
I am investigating using the -G flag to attach gdb to a running guest machi= ne. It looks like breakpoints and single instruction stepping are not implement= ed 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 doe= sn'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 f= lag in the guest's RFLAGS register, and then intercept each #DB exception i= n the vmm. Has anyone looked at this on the AMD side? Any advice? --- Rob Crowston.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?JLXI5eQvGXOFQYyj4zt5c5ghWrorH8PZJrWsVlTQV0hCcOivLLkyjNZLO4yz-HZwHp00kTK6jRjJY81iSb660nRqjZgTBNG7Vk1DMNWNFfY=>