reactos/ntoskrnl/kd
Hermès Bélusca-Maïto d489f1a170
[NTOS:KD] Supplement minimal handling in KdSend/ReceivePacket when no kernel debugger is present.
CORE-20107

Improve the minimal handling done in the fall-back KdSend/ReceivePacket()
routines when they are invoked by KD64 (in Release build).

Part of my `kdbg_tests_kdio_split` branch for splitting kd/kdio.c
into a separate KD dll.

KdSendPacket:
- Silently ignore PACKET_TYPE_KD_STATE_CHANGE32/64 DbgKdLoadSymbolsStateChange notification.
- Partially manage and log the unhandled PACKET_TYPE_KD_STATE_CHANGE DbgKdExceptionStateChange notification.
- Log other unhandled PACKET_TYPE_KD_STATE_CHANGE32/64 and PACKET_TYPE_KD_STATE_MANIPULATE notifications.

When KdSendPacket receives the DbgKdExceptionStateChange notification,
it cannot handle it (no debugger is there!). However, we need to claim
the debugger to be present, so that its KD64 caller: KdpSendWaitContinue(),
can call back KdReceivePacket(PACKET_TYPE_KD_STATE_MANIPULATE), which,
in turn, informs KD that the exception cannot be handled, by returning
a failure code in the ManipulateState's ContinueStatus.

During bugchecks, this allows KiBugCheckDebugBreak() to not loop infinitely,
but instead fall back into calling HalHaltSystem() to halt the computer.
2025-04-19 20:01:10 +02:00
..
arm [NTOS:KD:KDBG] Move some files to a better place. 2023-03-27 23:31:28 +02:00
i386 [NTOS:KD] Fix buffer overflow for the signon in KdPortInitializeEx. 2023-04-05 03:33:39 +02:00
kd.h [NTOS:KD] Fix KdMax value without KDBG debugger (#7889) 2025-04-16 17:18:07 +02:00
kdio.c [NTOS:KD] Supplement minimal handling in KdSend/ReceivePacket when no kernel debugger is present. 2025-04-19 20:01:10 +02:00
kdmain.c [NTOS:KD:KDBG] Integration into KD framework (Part 2/3) 2023-08-31 16:09:49 +02:00
kdprompt.c [NTOS:KD] Fix build, addendum to commit f3dd7133. 2023-03-29 03:36:24 +02:00
kdps2kbd.c [NTOS:KD] Update file headers. 2023-03-27 23:31:33 +02:00
kdserial.c [NTOS:KD:KDBG] Isolate the read-line (prompt) functionality in a separate file. 2023-03-28 16:14:40 +02:00
kdterminal.c Fix build, addendum to commit 35180b3a 2023-03-29 02:55:06 +02:00
kdterminal.h [NTOS:KDBG] Isolate terminal and input-related routines from the rest of KDBG. (#5188) 2023-03-29 02:42:31 +02:00