https://git.reactos.org/?p=reactos.git;a=commitdiff;h=76a41370d0199c99d9857…
commit 76a41370d0199c99d9857adbb3da3b9a67df5579
Author: Hervé Poussineau <hpoussin(a)reactos.org>
AuthorDate: Mon Mar 30 00:03:02 2020 +0200
Commit: Hervé Poussineau <hpoussin(a)reactos.org>
CommitDate: Mon Mar 30 15:23:34 2020 +0200
[NTOS:KD] Move dump of stack trace on crash to debugger
Release builds now show again the bugcheck screen, instead of freezing.
---
ntoskrnl/kd/kdmain.c | 3 +++
ntoskrnl/ke/bug.c | 9 ---------
2 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/ntoskrnl/kd/kdmain.c b/ntoskrnl/kd/kdmain.c
index 25a63a1c0cb..5749cc8701d 100644
--- a/ntoskrnl/kd/kdmain.c
+++ b/ntoskrnl/kd/kdmain.c
@@ -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! */
diff --git a/ntoskrnl/ke/bug.c b/ntoskrnl/ke/bug.c
index 7df5c21ed22..47b1f4b5ca3 100644
--- a/ntoskrnl/ke/bug.c
+++ b/ntoskrnl/ke/bug.c
@@ -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 */