[STORPORT] Fix x64 build
[reactos.git] / ntoskrnl / ke / amd64 / trap.S
index 38ca46e..3988ab9 100644 (file)
@@ -22,6 +22,11 @@ EXTERN KiXmmExceptionHandler:PROC
 EXTERN KiDeliverApc:PROC
 EXTERN KiDpcInterruptHandler:PROC
 
+#ifdef _WINKD_
+EXTERN KdSetOwedBreakpoints:PROC
+#endif
+
+
 /* GLOBALS *******************************************************************/
 
 .data
@@ -508,7 +513,18 @@ FUNC KiPageFault
 
     /* Check for success */
     test eax, eax
+#ifndef _WINKD_
     jge PageFaultReturn
+#else
+    jl PageFaultError
+
+    /* Check whether the kernel debugger has owed breakpoints to be inserted */
+    call KdSetOwedBreakpoints
+    /* We succeeded, return */
+    jmp PageFaultReturn
+
+PageFaultError:
+#endif
 
     /* Disable interrupts again for the debugger */
     cli
@@ -527,7 +543,6 @@ FUNC KiPageFault
     je SpecialCode
 
 InPageException:
-
     /* Dispatch in-page exception */
     mov r11d, eax // Param3 = Status
     mov eax, STATUS_IN_PAGE_ERROR // ExceptionCode