[NTOS:KD] Move dump of stack trace on crash to debugger
authorHervé Poussineau <hpoussin@reactos.org>
Sun, 29 Mar 2020 22:03:02 +0000 (00:03 +0200)
committerHervé Poussineau <hpoussin@reactos.org>
Mon, 30 Mar 2020 13:23:34 +0000 (15:23 +0200)
Release builds now show again the bugcheck screen, instead of freezing.

ntoskrnl/kd/kdmain.c
ntoskrnl/ke/bug.c

index 25a63a1..5749cc8 100644 (file)
@@ -277,6 +277,9 @@ KdpEnterDebuggerException(IN PKTRAP_FRAME TrapFrame,
                                                   Context,
                                                   TrapFrame);
     }
+
+    /* We'll manually dump the stack for the user... */
+    KeRosDumpStackFrames(NULL, 0);
 #endif /* not KDBG */
 
     /* Debugger didn't handle it, please handle! */
index 7df5c21..47b1f4b 100644 (file)
@@ -1067,15 +1067,6 @@ KeBugCheckWithTf(IN ULONG BugCheckCode,
             /* Break in the debugger */
             KiBugCheckDebugBreak(DBG_STATUS_BUGCHECK_FIRST);
         }
-        else
-        {
-            /*
-             * ROS HACK.
-             * Ok, so debugging is enabled, but KDBG isn't there.
-             * We'll manually dump the stack for the user.
-             */
-            KeRosDumpStackFrames(NULL, 0);
-        }
     }
 
     /* Raise IRQL to HIGH_LEVEL */