Author: tkreuzer
Date: Thu Oct 29 00:54:07 2009
New Revision: 43824
URL:
http://svn.reactos.org/svn/reactos?rev=43824&view=rev
Log:
Partly implement KiDebugTrapOrFault. Single stepping now works.
Modified:
branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/trap.S
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/trap.S
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/trap.S [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/trap.S [iso-8859-1] Thu Oct 29
00:54:07 2009
@@ -242,9 +242,22 @@
push 0
.allocstack 0x8
- UNIMPLEMENTED KiDebugTrapOrFault
-
- jmp $
+ ENTER_TRAP_FRAME (SIZE_EXCEPTION_RECORD + 0x28), 0
+
+ /* Check if the frame was from kernelmode */
+ test word ptr [rbp + KTRAP_FRAME_SegCs], 3
+ jz KiDebugTrapOrFaultKMode
+
+ /* Enable interrupts for user-mode */
+ sti
+
+KiDebugTrapOrFaultKMode:
+
+ DISPATCH_EXCEPTION STATUS_SINGLE_STEP, 0, 0, 0, 0
+
+ /* Return */
+ LEAVE_TRAP_FRAME
+ iretq
.endproc
.proc KiNmiInterrupt