I am consistently seeing the error message "Got into OnDebugTrap with LastBreakpoint error" when using the KVM backend.
I suspect the trap flag needs to be explicitly disabled here:
Instead of:
if (TraceType_ == TraceType_t::Rip) {
TrapFlag(true);
} else {
KvmDebugPrint("Turning off RFLAGS.TF\n");
}
do:
if (TraceType_ == TraceType_t::Rip) {
TrapFlag(true);
} else {
KvmDebugPrint("Turning off RFLAGS.TF\n");
TrapFlag(false);
}