HomeFreeBSD

Fix single-stepping of instructions emulated by vm86.

Description

Fix single-stepping of instructions emulated by vm86.

In vm86.c, fix 2 (rarely used) cases where the return code lost the
single-step indicator. While here, fix 2 misspellings of PSL_T as
PSL_TF (TF is the CPU manufacturer's spelling, but we use T).

In trap.c, turn T_PROTFLT and T_STKFLT into T_TRCTRAP if
vm86_emulate() asked for this (it does this when the instruction is
being traced and was successully emulated). In the kernel case, we
used to deliver the trap as SIGTRAP to the process, where it always
terminated the process; now we deliver the trap as T_TRCTRAP to kdb,
where it normally gives single-stepping. In the user case, the only
difference is that we now clear PSL_T and initialize ucode properly.

Reviewed by: kib

Details

Provenance
Bruce Evans <bde@FreeBSD.org>Authored on Sep 8 2016, 2:43 PM
Parents
rGe62264e2dd8b: Update capabilities.conf comment
Branches
Unknown
Tags
Unknown

Event Timeline