mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 18:22:35 +00:00
[NTOS:KD/KDBG] Code enhancements for KDBG/KD.
- Introduce KdpScreenAcquire() / KdpScreenRelease() helpers that allow to correctly acquire or release the screen when using INBV for "Screen-Mode" debugging. - Introduce KdpAcquireLock() / KdpReleaseLock() helpers so as to reduce the copy-pasted code required when acquiring spin-locks in the KD debug logger functions. - Close the opened KdpLogFileHandle file in the KdpInitDebugLog() logger in case we failed to create the logger writer thread. Also use explicit kernel-mode handle when opening the log file. - static-ify some local variables, remove few hardcoded values, and minor formatting. - Correctly define the INIT_FUNCTION's.
This commit is contained in:
parent
a4b6e0d929
commit
9537653ee7
5 changed files with 156 additions and 147 deletions
|
@ -31,7 +31,7 @@ KD_DISPATCH_TABLE DispatchTable[KdMax];
|
|||
|
||||
PKDP_INIT_ROUTINE InitRoutines[KdMax] = {KdpScreenInit,
|
||||
KdpSerialInit,
|
||||
KdpInitDebugLog,
|
||||
KdpDebugLogInit,
|
||||
KdpBochsInit,
|
||||
KdpKdbgInit};
|
||||
|
||||
|
@ -39,9 +39,9 @@ extern ANSI_STRING KdpLogFileName;
|
|||
|
||||
/* PRIVATE FUNCTIONS *********************************************************/
|
||||
|
||||
INIT_FUNCTION
|
||||
PCHAR
|
||||
NTAPI
|
||||
INIT_FUNCTION
|
||||
KdpGetDebugMode(PCHAR Currentp2)
|
||||
{
|
||||
PCHAR p1, p2 = Currentp2;
|
||||
|
@ -135,9 +135,9 @@ KdpGetDebugMode(PCHAR Currentp2)
|
|||
return p2;
|
||||
}
|
||||
|
||||
INIT_FUNCTION
|
||||
VOID
|
||||
NTAPI
|
||||
INIT_FUNCTION
|
||||
KdpCallInitRoutine(ULONG BootPhase)
|
||||
{
|
||||
PLIST_ENTRY CurrentEntry;
|
||||
|
@ -213,7 +213,7 @@ KdInitSystem(ULONG BootPhase,
|
|||
}
|
||||
else
|
||||
{
|
||||
/* Called from a bugcheck or a re-enable. Unconditionally enable KD */
|
||||
/* Called from a bugcheck or a re-enable. Unconditionally enable KD. */
|
||||
KdDebuggerEnabled = TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue