[ros-diffs] [ros-arm-bringup] 34485: - ARM instructions are 4 bytes long, not 1, so decrement the PC by four during breakpoints (so the caller gets the address of the previous instruction, just like on x86).

ros-arm-bringup at svn.reactos.org ros-arm-bringup at svn.reactos.org
Mon Jul 14 02:24:33 CEST 2008


Author: ros-arm-bringup
Date: Sun Jul 13 19:24:33 2008
New Revision: 34485

URL: http://svn.reactos.org/svn/reactos?rev=34485&view=rev
Log:
- ARM instructions are 4 bytes long, not 1, so decrement the PC by four during breakpoints (so the caller gets the address of the previous instruction, just like on x86).

Modified:
    trunk/reactos/ntoskrnl/ke/arm/exp.c

Modified: trunk/reactos/ntoskrnl/ke/arm/exp.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/arm/exp.c?rev=34485&r1=34484&r2=34485&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/ke/arm/exp.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/arm/exp.c [iso-8859-1] Sun Jul 13 19:24:33 2008
@@ -213,9 +213,9 @@
         case STATUS_BREAKPOINT:
             
             //
-            // Decrement PC by one
-            //
-            Context.Pc--;
+            // We want the instruction right before the int 3
+            //
+            Context.Pc -= sizeof(ULONG);
             break;
             
         //



More information about the Ros-diffs mailing list