mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 22:32:41 +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
|
@ -26,8 +26,8 @@
|
|||
*
|
||||
* See also: kd\kdio.c
|
||||
*/
|
||||
static SIZE_T
|
||||
INIT_FUNCTION
|
||||
static INIT_FUNCTION
|
||||
SIZE_T
|
||||
KdpGetMemorySizeInMBs(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
|
||||
{
|
||||
PLIST_ENTRY ListEntry;
|
||||
|
@ -67,8 +67,8 @@ KdpGetMemorySizeInMBs(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
|
|||
}
|
||||
|
||||
/* See also: kd\kdio.c */
|
||||
static VOID
|
||||
INIT_FUNCTION
|
||||
static INIT_FUNCTION
|
||||
VOID
|
||||
KdpPrintBanner(IN SIZE_T MemSizeMBs)
|
||||
{
|
||||
DPRINT1("-----------------------------------------------------\n");
|
||||
|
@ -340,7 +340,7 @@ KdInitSystem(IN ULONG BootPhase,
|
|||
}
|
||||
else
|
||||
{
|
||||
/* Called from a bugcheck or a re-enable. Save the Kernel Base */
|
||||
/* Called from a bugcheck or a re-enable. Save the Kernel Base. */
|
||||
KdVersionBlock.KernBase = (ULONG64)(LONG_PTR)PsNtosImageBase;
|
||||
|
||||
/* Unconditionally enable KD */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue