Go to the source code of this file.
◆ DeInstallGPFaultHook()
Definition at line 126 of file gpfault.c.
ULONG SetGlobalInt(ULONG dwInt, ULONG NewIntHandler)
BOOLEAN RemoveAllSWBreakpoints(BOOLEAN bEvenPermanents)
Referenced by CleanUpPICE().
◆ InstallGPFaultHook()
Definition at line 102 of file gpfault.c.
104 ULONG LocalGPFaultHandler;
111 __asm__(
"mov $NewGPFaultHandler,%0" 112 :
"=r" (LocalGPFaultHandler)
ULONG SetGlobalInt(ULONG dwInt, ULONG NewIntHandler)
__asm__("\n\t \
NewGPFaultHandler:\n\t \
pushfl\n\t \
cli\n\t \
cld\n\t \
pushal\n\t \
pushl %ds\n\t \
\n\t \
// test for v86 mode\n\t \
testl $0x20000,40(%esp)\n\t \
jnz notv86\n\t \
popl %ds\n\t \
popal\n\t \
popfl\n\t \
.byte 0x2e\n\t \
jmp *_OldGPFaultHandler\n\t \
notv86:\n\t \
// setup default data selectors\n\t \
movw %ss,%ax\n\t \
movw %ax,%ds\n\t \
\n\t \
// get frame ptr\n\t \
lea 40(%esp),%eax\n\t \
pushl %eax\n\t \
call _HandleGPFault\n\t \
addl $4,%esp\n\t \
\n \t \
popl %ds\n\t \
popal\n\t \
popfl\n\t \
// remove error code from stack and replace with reason code\n\t \
movl $" STR(REASON_GP_FAULT) ",(%esp)\n\t \
// call debugger loop\n\t \
jmp NewInt31Handler\n\t \
")
Referenced by InitPICE().
◆ OldGPFaultHandler