VMware Communities
cal0
Contributor
Contributor

Magic Breakpoints for GDB Stub

I am leveraging VMware for the development of one of my own hypervisors, and it works great to create an environment where this is made possible. However, in the realm of supported debugging tools, I am having a problem with breakpointing within the GDB stub once everything is configured for me to do so. This problem being the workflow is just too slow. I have configured everything correctly, but the time it takes to attach to the GDB stub, find the target code region, place the breakpoint, and then run the guest is just not very streamlined for my purposes. For this reason, I was curious if anybody would know if it's possible to automatically force the GDB stub to break on a certain line of code from within the guest. Something like boch's magic breakpoints but with something more streamlined to the hypervisor itself. Ideally, I'd like to be able to run a port-based instruction or another privileged VMX-specific instruction and have it instead break back into the GDB stub. Is there perhaps a way to trigger this behavior all from within the guest?

This is for the purpose of allowing me to debug double/triple faults within my own implementation, as this is otherwise a somewhat difficult and time consuming process to setup. If anybody has any other tips within that realm as for workflows I could test out to make this less painful, I would be very grateful.

Thank you for your time.

0 Kudos
1 Reply
cal0
Contributor
Contributor

Really any tips in proceeding with this workflow would be great.

0 Kudos