[NTOS:KD64] Use KdpDprintf() instead of DbgPrint() for the debugger banner DPRINTs (#7540)

Override DbgPrint(), used by the debugger banner DPRINTs,
because KdInitSystem() can be called under the debugger lock
by KdEnableDebugger(WithLock)().

In this case, when DbgPrint() (re-)enters the debugger via an
interrupt and acquires the debugger lock, a deadlock occurs.
This commit is contained in:
Hermès Bélusca-Maïto 2024-11-28 22:53:10 +01:00
parent 1a02d3306b
commit 6cf426345b
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0

View file

@ -11,9 +11,18 @@
#include <ntoskrnl.h> #include <ntoskrnl.h>
#include <reactos/buildno.h> #include <reactos/buildno.h>
#define NDEBUG #define NDEBUG
#include <debug.h> #include <debug.h>
/*
* Override DbgPrint(), used by the debugger banner DPRINTs below,
* because KdInitSystem() can be called under the debugger lock by
* KdEnableDebugger(WithLock)().
*/
#define DbgPrint(fmt, ...) (KdpDprintf(fmt, ##__VA_ARGS__), 0)
#define DbgPrintEx(cmpid, lvl, fmt, ...) (KdpDprintf(fmt, ##__VA_ARGS__), 0)
/* UTILITY FUNCTIONS *********************************************************/ /* UTILITY FUNCTIONS *********************************************************/
/* /*