fix stack dumps from printing an infinite amount of <0> in some cases
authorRoyce Mitchell III <royce3@ev1.net>
Sat, 18 Dec 2004 20:26:03 +0000 (20:26 +0000)
committerRoyce Mitchell III <royce3@ev1.net>
Sat, 18 Dec 2004 20:26:03 +0000 (20:26 +0000)
svn path=/trunk/; revision=12199

reactos/ntoskrnl/ke/i386/exp.c

index ce154ab..85544a4 100644 (file)
@@ -632,10 +632,11 @@ KeDumpStackFrames(PULONG Frame)
        DbgPrint("Frames: ");
        while ( MmIsAddressValid(Frame) )
        {
        DbgPrint("Frames: ");
        while ( MmIsAddressValid(Frame) )
        {
-               if (!KeRosPrintAddress((PVOID)Frame[1]))
-               {
-                       DbgPrint("<%X>", (PVOID)Frame[1]);
-               }
+               ULONG Addr = Frame[1];
+               if (!KeRosPrintAddress((PVOID)Addr))
+                       DbgPrint("<%X>", Addr);
+               if ( Addr == 0 || Addr == 0xDEADBEEF )
+                       break;
                Frame = (PULONG)Frame[0];
                DbgPrint(" ");
        }
                Frame = (PULONG)Frame[0];
                DbgPrint(" ");
        }
@@ -661,13 +662,9 @@ KeRosDumpStackFrames ( PULONG Frame, ULONG FrameCount )
        {
                ULONG Addr = Frame[1];
                if (!KeRosPrintAddress((PVOID)Addr))
        {
                ULONG Addr = Frame[1];
                if (!KeRosPrintAddress((PVOID)Addr))
-               {
                        DbgPrint("<%X>", Addr);
                        DbgPrint("<%X>", Addr);
-               }
                if ( Addr == 0 || Addr == 0xDEADBEEF )
                if ( Addr == 0 || Addr == 0xDEADBEEF )
-               {
                        break;
                        break;
-               }
                Frame = (PULONG)Frame[0];
                DbgPrint(" ");
        }
                Frame = (PULONG)Frame[0];
                DbgPrint(" ");
        }