Geoff Chappell, Software Analyst
The KTRAP_FRAME (formally a _KTRAP_FRAME) is a structure in which the kernel saves the state of execution that gets interrupted for diversion to the kernel, whether from external hardware, the processor itself (for a trap or fault) or by software executing an int instruction or similar.
The KTRAP_FRAME is highly specific to the processor architecture. Indeed, public symbol files confirm that Microsoft differentiates the x86 and x64 implementations not by conditional compilation but by defining them in separate headers. This note follows Microsoft and presents the x86 KTRAP_FRAME and x64 KTRAP_FRAME separately.