12 pushl $0 /* ErrorCode */
15 movl 20(%esp), %ebp /* Eip */
16 movl 16(%esp), %ebx /* Eflags */
18 movl 12(%esp), %ebx /* Cs */
24 pushl $0 /* ExceptionList */
25 pushl $0 /* PreviousMode */
35 /* Clear all breakpoint enables in dr7. */
36 andl $0xFFFF0000, %eax
49 pushl %eax /* TempEsp */
50 pushl %ss /* TempSegSs */
51 pushl $0 /* DebugPointer */
52 pushl $3 /* DebugArgMark (Exception number) */
53 pushl 0x60(%esp) /* DebugEip */
54 pushl %ebp /* DebugEbp */
60 pushl $1 /* FirstChance */
61 pushl %eax /* Push a pointer to the trap frame */
62 pushl $0 /* Context */
63 pushl $0 /* PreviousMode (KernelMode) */
64 pushl $0 /* ExceptionRecord */
65 call _KdbEnterDebuggerException
68 * Pop the arguments and unused portions of the trap frame:
79 * Restore/update debugging registers.
95 * Restore registers including any that might have been changed
96 * inside the debugger.
104 addl $8, %esp /* PreviousMode, ExceptionList */
110 addl $4, %esp /* ErrorCode */
113 * Return to the caller.
118 .globl _KdbpStackSwitchAndCall@8
119 _KdbpStackSwitchAndCall@8:
123 movl 0x8(%esp), %eax /* New stack */
124 movl 0xC(%esp), %ecx /* Function to call */
125 movl %esp, %edx /* Old stack */
134 /* Switch back to old stack */