5 EXTERN _KdbEnterDebuggerException:PROC
16 push 0 /* ErrorCode */
19 mov ebp, [esp + 20] /* Eip */
20 mov ebx, [esp + 16] /* Eflags */
22 mov ebx, [esp + 12] /* Cs */
28 push 0 /* ExceptionList */
29 push 0 /* PreviousMode */
39 /* Clear all breakpoint enables in dr7. */
40 and eax, HEX(0FFFF0000)
52 lea eax, [esp + HEX(58)]
53 push eax /* TempEsp */
54 push ss /* TempSegSs */
55 push 0 /* DebugPointer */
56 push 3 /* DebugArgMark (Exception number) */
57 push [esp + HEX(60)] /* DebugEip */
58 push ebp /* DebugEbp */
64 push 1 /* FirstChance */
65 push eax /* Push a pointer to the trap frame */
67 push 0 /* PreviousMode (KernelMode) */
68 push 0 /* ExceptionRecord */
69 call _KdbEnterDebuggerException
72 * Pop the arguments and unused portions of the trap frame:
83 * Restore/update debugging registers.
99 * Restore registers including any that might have been changed
100 * inside the debugger.
108 add esp, 8 /* PreviousMode, ExceptionList */
114 add esp, 4 /* ErrorCode */
117 * Return to the caller.
122 PUBLIC _KdbpStackSwitchAndCall@8
123 _KdbpStackSwitchAndCall@8:
127 mov eax, [esp + 8] /* New stack */
128 mov ecx, [esp + 12] /* Function to call */
129 mov edx, esp /* Old stack */
138 /* Switch back to old stack */