2010-02-26 11:43:19 +00:00
|
|
|
#pragma once
|
2023-03-27 21:13:53 +00:00
|
|
|
#include "../kd/kd.h"
|
2005-03-05 23:35:08 +00:00
|
|
|
|
|
|
|
/* TYPES *********************************************************************/
|
|
|
|
|
|
|
|
/* from kdb.c */
|
2020-04-08 21:08:57 +00:00
|
|
|
typedef CONTEXT KDB_KTRAP_FRAME, *PKDB_KTRAP_FRAME;
|
2005-03-05 23:35:08 +00:00
|
|
|
|
|
|
|
typedef enum _KDB_BREAKPOINT_TYPE
|
|
|
|
{
|
|
|
|
KdbBreakPointNone = 0,
|
|
|
|
KdbBreakPointSoftware,
|
|
|
|
KdbBreakPointHardware,
|
|
|
|
KdbBreakPointTemporary
|
|
|
|
} KDB_BREAKPOINT_TYPE;
|
|
|
|
|
|
|
|
typedef enum _KDB_ACCESS_TYPE
|
|
|
|
{
|
|
|
|
KdbAccessRead,
|
|
|
|
KdbAccessWrite,
|
|
|
|
KdbAccessReadWrite,
|
|
|
|
KdbAccessExec
|
|
|
|
} KDB_ACCESS_TYPE;
|
|
|
|
|
|
|
|
typedef struct _KDB_BREAKPOINT
|
|
|
|
{
|
|
|
|
KDB_BREAKPOINT_TYPE Type; /* Type of breakpoint */
|
|
|
|
BOOLEAN Enabled; /* Whether the bp is enabled */
|
|
|
|
ULONG_PTR Address; /* Address of the breakpoint */
|
|
|
|
BOOLEAN Global; /* Whether the breakpoint is global or local to a process */
|
|
|
|
PEPROCESS Process; /* Owning process */
|
|
|
|
PCHAR ConditionExpression;
|
|
|
|
PVOID Condition;
|
|
|
|
union {
|
|
|
|
/* KdbBreakPointSoftware */
|
|
|
|
UCHAR SavedInstruction;
|
|
|
|
/* KdbBreakPointHardware */
|
|
|
|
struct {
|
|
|
|
UCHAR DebugReg : 2;
|
|
|
|
UCHAR Size : 3;
|
|
|
|
KDB_ACCESS_TYPE AccessType;
|
|
|
|
} Hw;
|
|
|
|
} Data;
|
|
|
|
} KDB_BREAKPOINT, *PKDB_BREAKPOINT;
|
|
|
|
|
|
|
|
typedef enum _KDB_ENTER_CONDITION
|
|
|
|
{
|
|
|
|
KdbDoNotEnter,
|
|
|
|
KdbEnterAlways,
|
|
|
|
KdbEnterFromKmode,
|
|
|
|
KdbEnterFromUmode
|
|
|
|
} KDB_ENTER_CONDITION;
|
|
|
|
|
2023-03-21 17:42:29 +00:00
|
|
|
typedef enum _KD_CONTINUE_TYPE
|
|
|
|
{
|
|
|
|
kdContinue = 0,
|
|
|
|
kdDoNotHandleException,
|
|
|
|
kdHandleException
|
|
|
|
} KD_CONTINUE_TYPE;
|
|
|
|
|
|
|
|
|
|
|
|
/* GLOBALS *******************************************************************/
|
|
|
|
|
2022-11-28 02:13:31 +00:00
|
|
|
extern volatile PCHAR KdbInitFileBuffer;
|
2023-03-21 17:42:29 +00:00
|
|
|
|
|
|
|
extern PEPROCESS KdbCurrentProcess;
|
|
|
|
extern PETHREAD KdbCurrentThread;
|
|
|
|
extern LONG KdbLastBreakPointNr;
|
|
|
|
extern ULONG KdbNumSingleSteps;
|
|
|
|
extern BOOLEAN KdbSingleStepOver;
|
|
|
|
extern PKDB_KTRAP_FRAME KdbCurrentTrapFrame;
|
|
|
|
|
2005-03-05 23:35:08 +00:00
|
|
|
|
|
|
|
/* FUNCTIONS *****************************************************************/
|
|
|
|
|
|
|
|
/* from i386/i386-dis.c */
|
|
|
|
|
|
|
|
LONG
|
|
|
|
KdbpDisassemble(
|
2020-01-26 17:59:05 +00:00
|
|
|
IN ULONG_PTR Address,
|
2005-03-05 23:35:08 +00:00
|
|
|
IN ULONG IntelSyntax);
|
2005-05-09 01:38:29 +00:00
|
|
|
|
2005-03-05 23:35:08 +00:00
|
|
|
LONG
|
|
|
|
KdbpGetInstLength(
|
2020-01-26 17:59:05 +00:00
|
|
|
IN ULONG_PTR Address);
|
2005-03-05 23:35:08 +00:00
|
|
|
|
|
|
|
/* from i386/kdb_help.S */
|
|
|
|
|
2008-11-29 20:47:48 +00:00
|
|
|
VOID NTAPI
|
2005-03-05 23:35:08 +00:00
|
|
|
KdbpStackSwitchAndCall(
|
|
|
|
IN PVOID NewStack,
|
|
|
|
IN VOID (*Function)(VOID));
|
|
|
|
|
|
|
|
/* from kdb_cli.c */
|
|
|
|
|
[NTOS:KD][KDBG] Rework the BootPhase >= 2 initialization of the KD/KDBG kernel debugger. (#4892)
CORE-17470
+ KdpDebugLogInit: Add resources cleanup in failure code paths.
Fix, in an NT-compatible manner, how (and when) the KD/KDBG BootPhase >=2
initialization steps are performed.
These are necessary for any functionality KDBG needs, that would depend
on the NT I/O Manager and the storage and filesystem stacks to be running.
This includes, creating the debug log file, and for KDBG, loading its
KDBinit initialization file.
As a result, file debug logging is fixed.
The old ReactOS-specific (NT-incompatible) callback we did in the middle
of IoInitSystem() is removed, in favor of a runtime mechanism that should
work on Windows as well.
The idea for this new mechanism is loosely inspired by the TDL4 rootkit,
see http://blog.w4kfu.com/public/tdl4_article/draft_tdl4article.html
but contrary to it, a specific hook is used instead, as well as the
technique of driver reinitialization:
https://web.archive.org/web/20211021050515/https://driverentry.com.br/en/blog/?p=261
Its rationale is as follows:
We want to be able to perform I/O-related initialization (starting a
logger thread for file log debugging, loading KDBinit file for KDBG,
etc.). A good place for this would be as early as possible, once the
I/O Manager has started the storage and the boot filesystem drivers.
Here is an overview of the initialization steps of the NT Kernel and
Executive:
----
KiSystemStartup(KeLoaderBlock)
if (Cpu == 0) KdInitSystem(0, KeLoaderBlock);
KiSwitchToBootStack() -> KiSystemStartupBootStack()
-> KiInitializeKernel() -> ExpInitializeExecutive(Cpu, KeLoaderBlock)
(NOTE: Any unexpected debugger break will call KdInitSystem(0, NULL); )
KdInitSystem(0, LoaderBlock) -> KdDebuggerInitialize0(LoaderBlock);
ExpInitializeExecutive(Cpu == 0): ExpInitializationPhase = 0;
HalInitSystem(0, KeLoaderBlock); <-- Sets HalInitPnpDriver callback.
...
PsInitSystem(LoaderBlock)
PsCreateSystemThread(Phase1Initialization)
Phase1Initialization(Discard): ExpInitializationPhase = 1;
HalInitSystem(1, KeLoaderBlock);
...
Early initialization of Ob, Ex, Ke.
KdInitSystem(1, KeLoaderBlock);
...
KdDebuggerInitialize1(LoaderBlock);
...
IoInitSystem(LoaderBlock);
...
----
As we can see, KdDebuggerInitialize1() is the last KD initialization
routine the kernel calls, and is called *before* the I/O Manager starts.
Thus, direct Nt/ZwCreateFile ... calls done there would fail. Also,
we want to do the I/O initialization as soon as possible. There does
not seem to be any exported way to be notified about the I/O manager
initialization steps... that is, unless we somehow become a driver and
insert ourselves in the flow!
Since we are not a regular driver, we need to invoke IoCreateDriver()
to create one. However, remember that we are currently running *before*
IoInitSystem(), the I/O subsystem is not initialized yet. Due to this,
calling IoCreateDriver(), much like any other IO functions, would lead
to a crash, because it calls
ObCreateObject(..., IoDriverObjectType, ...), and IoDriverObjectType
is non-initialized yet (it's NULL).
The chosen solution is to hook a "known" exported callback: namely, the
HalInitPnpDriver() callback (it initializes the "HAL Root Bus Driver").
It is set very early on by the HAL via the HalInitSystem(0, ...) call,
and is called early on by IoInitSystem() before any driver is loaded,
but after the I/O Manager has been minimally set up so that new drivers
can be created.
When the hook: KdpInitDriver() is called, we create our driver with
IoCreateDriver(), specifying its entrypoint KdpDriverEntry(), then
restore and call the original HalInitPnpDriver() callback.
Another possible unexplored alternative, could be to insert ourselves
in the KeLoaderBlock->LoadOrderListHead boot modules list, or in the
KeLoaderBlock->BootDriverListHead boot-driver list. (Note that while
we may be able to do this, because boot-drivers are resident in memory,
much like we are, we cannot insert ourselves in the system-driver list
however, since those drivers are expected to come from PE image files.)
Once the KdpDriverEntry() driver entrypoint is called, we register
KdpDriverReinit() for re-initialization with the I/O Manager, in order
to provide more initialization points. KdpDriverReinit() calls the KD
providers at BootPhase >= 2, and schedules further reinitializations
(at most 3 more) if any of the providers request so.
2023-01-09 18:35:18 +00:00
|
|
|
NTSTATUS
|
2023-03-10 17:12:32 +00:00
|
|
|
NTAPI
|
|
|
|
KdbInitialize(
|
|
|
|
_In_ PKD_DISPATCH_TABLE DispatchTable,
|
|
|
|
_In_ ULONG BootPhase);
|
|
|
|
|
2020-03-31 21:40:14 +00:00
|
|
|
BOOLEAN
|
|
|
|
NTAPI
|
|
|
|
KdbRegisterCliCallback(
|
|
|
|
PVOID Callback,
|
|
|
|
BOOLEAN Deregister);
|
|
|
|
|
[NTOS:KD][KDBG] Rework the BootPhase >= 2 initialization of the KD/KDBG kernel debugger. (#4892)
CORE-17470
+ KdpDebugLogInit: Add resources cleanup in failure code paths.
Fix, in an NT-compatible manner, how (and when) the KD/KDBG BootPhase >=2
initialization steps are performed.
These are necessary for any functionality KDBG needs, that would depend
on the NT I/O Manager and the storage and filesystem stacks to be running.
This includes, creating the debug log file, and for KDBG, loading its
KDBinit initialization file.
As a result, file debug logging is fixed.
The old ReactOS-specific (NT-incompatible) callback we did in the middle
of IoInitSystem() is removed, in favor of a runtime mechanism that should
work on Windows as well.
The idea for this new mechanism is loosely inspired by the TDL4 rootkit,
see http://blog.w4kfu.com/public/tdl4_article/draft_tdl4article.html
but contrary to it, a specific hook is used instead, as well as the
technique of driver reinitialization:
https://web.archive.org/web/20211021050515/https://driverentry.com.br/en/blog/?p=261
Its rationale is as follows:
We want to be able to perform I/O-related initialization (starting a
logger thread for file log debugging, loading KDBinit file for KDBG,
etc.). A good place for this would be as early as possible, once the
I/O Manager has started the storage and the boot filesystem drivers.
Here is an overview of the initialization steps of the NT Kernel and
Executive:
----
KiSystemStartup(KeLoaderBlock)
if (Cpu == 0) KdInitSystem(0, KeLoaderBlock);
KiSwitchToBootStack() -> KiSystemStartupBootStack()
-> KiInitializeKernel() -> ExpInitializeExecutive(Cpu, KeLoaderBlock)
(NOTE: Any unexpected debugger break will call KdInitSystem(0, NULL); )
KdInitSystem(0, LoaderBlock) -> KdDebuggerInitialize0(LoaderBlock);
ExpInitializeExecutive(Cpu == 0): ExpInitializationPhase = 0;
HalInitSystem(0, KeLoaderBlock); <-- Sets HalInitPnpDriver callback.
...
PsInitSystem(LoaderBlock)
PsCreateSystemThread(Phase1Initialization)
Phase1Initialization(Discard): ExpInitializationPhase = 1;
HalInitSystem(1, KeLoaderBlock);
...
Early initialization of Ob, Ex, Ke.
KdInitSystem(1, KeLoaderBlock);
...
KdDebuggerInitialize1(LoaderBlock);
...
IoInitSystem(LoaderBlock);
...
----
As we can see, KdDebuggerInitialize1() is the last KD initialization
routine the kernel calls, and is called *before* the I/O Manager starts.
Thus, direct Nt/ZwCreateFile ... calls done there would fail. Also,
we want to do the I/O initialization as soon as possible. There does
not seem to be any exported way to be notified about the I/O manager
initialization steps... that is, unless we somehow become a driver and
insert ourselves in the flow!
Since we are not a regular driver, we need to invoke IoCreateDriver()
to create one. However, remember that we are currently running *before*
IoInitSystem(), the I/O subsystem is not initialized yet. Due to this,
calling IoCreateDriver(), much like any other IO functions, would lead
to a crash, because it calls
ObCreateObject(..., IoDriverObjectType, ...), and IoDriverObjectType
is non-initialized yet (it's NULL).
The chosen solution is to hook a "known" exported callback: namely, the
HalInitPnpDriver() callback (it initializes the "HAL Root Bus Driver").
It is set very early on by the HAL via the HalInitSystem(0, ...) call,
and is called early on by IoInitSystem() before any driver is loaded,
but after the I/O Manager has been minimally set up so that new drivers
can be created.
When the hook: KdpInitDriver() is called, we create our driver with
IoCreateDriver(), specifying its entrypoint KdpDriverEntry(), then
restore and call the original HalInitPnpDriver() callback.
Another possible unexplored alternative, could be to insert ourselves
in the KeLoaderBlock->LoadOrderListHead boot modules list, or in the
KeLoaderBlock->BootDriverListHead boot-driver list. (Note that while
we may be able to do this, because boot-drivers are resident in memory,
much like we are, we cannot insert ourselves in the system-driver list
however, since those drivers are expected to come from PE image files.)
Once the KdpDriverEntry() driver entrypoint is called, we register
KdpDriverReinit() for re-initialization with the I/O Manager, in order
to provide more initialization points. KdpDriverReinit() calls the KD
providers at BootPhase >= 2, and schedules further reinitializations
(at most 3 more) if any of the providers request so.
2023-01-09 18:35:18 +00:00
|
|
|
NTSTATUS
|
2011-03-16 21:07:25 +00:00
|
|
|
KdbpCliInit(VOID);
|
2005-03-05 23:35:08 +00:00
|
|
|
|
|
|
|
VOID
|
|
|
|
KdbpCliMainLoop(
|
|
|
|
IN BOOLEAN EnteredOnSingleStep);
|
|
|
|
|
|
|
|
VOID
|
2011-03-16 21:07:25 +00:00
|
|
|
KdbpCliInterpretInitFile(VOID);
|
2005-03-05 23:35:08 +00:00
|
|
|
|
2023-03-27 20:40:09 +00:00
|
|
|
VOID
|
|
|
|
KdbpCommandHistoryAppend(
|
|
|
|
_In_ PCSTR Command);
|
|
|
|
|
|
|
|
PCSTR
|
|
|
|
KdbGetHistoryEntry(
|
|
|
|
_Inout_ PLONG NextIndex,
|
|
|
|
_In_ BOOLEAN Next);
|
|
|
|
|
2022-11-21 15:35:47 +00:00
|
|
|
VOID
|
|
|
|
KdbpPager(
|
|
|
|
_In_ PCHAR Buffer,
|
|
|
|
_In_ ULONG BufLength);
|
|
|
|
|
2005-03-05 23:35:08 +00:00
|
|
|
VOID
|
|
|
|
KdbpPrint(
|
2022-11-21 15:35:47 +00:00
|
|
|
_In_ PSTR Format,
|
|
|
|
_In_ ...);
|
2005-03-05 23:35:08 +00:00
|
|
|
|
2022-07-17 17:17:18 +00:00
|
|
|
VOID
|
|
|
|
KdbpPrintUnicodeString(
|
|
|
|
_In_ PCUNICODE_STRING String);
|
|
|
|
|
2013-03-13 18:13:55 +00:00
|
|
|
BOOLEAN
|
|
|
|
NTAPI
|
|
|
|
KdbpGetHexNumber(
|
|
|
|
IN PCHAR pszNum,
|
|
|
|
OUT ULONG_PTR *pulValue);
|
|
|
|
|
2005-03-05 23:35:08 +00:00
|
|
|
/* from kdb_expr.c */
|
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
KdbpRpnEvaluateExpression(
|
|
|
|
IN PCHAR Expression,
|
|
|
|
IN PKDB_KTRAP_FRAME TrapFrame,
|
|
|
|
OUT PULONGLONG Result,
|
|
|
|
OUT PLONG ErrOffset OPTIONAL,
|
|
|
|
OUT PCHAR ErrMsg OPTIONAL);
|
|
|
|
|
|
|
|
PVOID
|
|
|
|
KdbpRpnParseExpression(
|
|
|
|
IN PCHAR Expression,
|
|
|
|
OUT PLONG ErrOffset OPTIONAL,
|
|
|
|
OUT PCHAR ErrMsg OPTIONAL);
|
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
KdbpRpnEvaluateParsedExpression(
|
|
|
|
IN PVOID Expression,
|
|
|
|
IN PKDB_KTRAP_FRAME TrapFrame,
|
|
|
|
OUT PULONGLONG Result,
|
|
|
|
OUT PLONG ErrOffset OPTIONAL,
|
|
|
|
OUT PCHAR ErrMsg OPTIONAL);
|
|
|
|
|
2004-08-26 16:04:50 +00:00
|
|
|
/* from kdb_symbols.c */
|
|
|
|
|
|
|
|
BOOLEAN
|
2009-09-22 21:31:55 +00:00
|
|
|
KdbpSymFindModule(
|
|
|
|
IN PVOID Address OPTIONAL,
|
|
|
|
IN INT Index OPTIONAL,
|
|
|
|
OUT PLDR_DATA_TABLE_ENTRY* pLdrEntry);
|
2004-08-26 16:04:50 +00:00
|
|
|
|
2020-03-31 21:40:14 +00:00
|
|
|
BOOLEAN
|
|
|
|
KdbSymPrintAddress(
|
|
|
|
IN PVOID Address,
|
2023-03-10 17:12:32 +00:00
|
|
|
IN PCONTEXT Context);
|
2020-03-31 21:40:14 +00:00
|
|
|
|
|
|
|
VOID
|
|
|
|
KdbSymProcessSymbols(
|
2021-06-22 17:46:27 +00:00
|
|
|
_Inout_ PLDR_DATA_TABLE_ENTRY LdrEntry,
|
|
|
|
_In_ BOOLEAN Load);
|
2020-03-31 21:40:14 +00:00
|
|
|
|
2023-03-20 01:28:16 +00:00
|
|
|
BOOLEAN
|
2023-03-10 17:12:32 +00:00
|
|
|
KdbSymInit(
|
|
|
|
_In_ ULONG BootPhase);
|
|
|
|
|
2005-03-05 23:35:08 +00:00
|
|
|
/* from kdb.c */
|
|
|
|
|
|
|
|
LONG
|
|
|
|
KdbpGetNextBreakPointNr(
|
|
|
|
IN ULONG Start OPTIONAL);
|
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
KdbpGetBreakPointInfo(
|
|
|
|
IN ULONG BreakPointNr,
|
|
|
|
OUT ULONG_PTR *Address OPTIONAL,
|
|
|
|
OUT KDB_BREAKPOINT_TYPE *Type OPTIONAL,
|
|
|
|
OUT UCHAR *Size OPTIONAL,
|
|
|
|
OUT KDB_ACCESS_TYPE *AccessType OPTIONAL,
|
|
|
|
OUT UCHAR *DebugReg OPTIONAL,
|
|
|
|
OUT BOOLEAN *Enabled OPTIONAL,
|
|
|
|
OUT BOOLEAN *Global OPTIONAL,
|
|
|
|
OUT PEPROCESS *Process OPTIONAL,
|
|
|
|
OUT PCHAR *ConditionExpression OPTIONAL);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
KdbpInsertBreakPoint(
|
|
|
|
IN ULONG_PTR Address,
|
|
|
|
IN KDB_BREAKPOINT_TYPE Type,
|
|
|
|
IN UCHAR Size OPTIONAL,
|
|
|
|
IN KDB_ACCESS_TYPE AccessType OPTIONAL,
|
|
|
|
IN PCHAR ConditionExpression OPTIONAL,
|
|
|
|
IN BOOLEAN Global,
|
2008-05-11 11:44:55 +00:00
|
|
|
OUT PLONG BreakPointNr OPTIONAL);
|
2005-05-09 01:38:29 +00:00
|
|
|
|
2005-03-05 23:35:08 +00:00
|
|
|
BOOLEAN
|
|
|
|
KdbpDeleteBreakPoint(
|
|
|
|
IN LONG BreakPointNr OPTIONAL,
|
|
|
|
IN OUT PKDB_BREAKPOINT BreakPoint OPTIONAL);
|
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
KdbpEnableBreakPoint(
|
|
|
|
IN LONG BreakPointNr OPTIONAL,
|
|
|
|
IN OUT PKDB_BREAKPOINT BreakPoint OPTIONAL);
|
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
KdbpDisableBreakPoint(
|
|
|
|
IN LONG BreakPointNr OPTIONAL,
|
|
|
|
IN OUT PKDB_BREAKPOINT BreakPoint OPTIONAL);
|
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
KdbpGetEnterCondition(
|
|
|
|
IN LONG ExceptionNr,
|
|
|
|
IN BOOLEAN FirstChance,
|
|
|
|
OUT KDB_ENTER_CONDITION *Condition);
|
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
KdbpSetEnterCondition(
|
|
|
|
IN LONG ExceptionNr,
|
|
|
|
IN BOOLEAN FirstChance,
|
|
|
|
IN KDB_ENTER_CONDITION Condition);
|
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
KdbpAttachToThread(
|
|
|
|
PVOID ThreadId);
|
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
KdbpAttachToProcess(
|
|
|
|
PVOID ProcessId);
|
|
|
|
|
2005-06-25 17:01:17 +00:00
|
|
|
VOID
|
2023-03-29 00:06:35 +00:00
|
|
|
KdbpGetCommandLineSettings(
|
|
|
|
_In_ PCSTR p1);
|
2005-06-25 17:01:17 +00:00
|
|
|
|
|
|
|
KD_CONTINUE_TYPE
|
2020-04-08 21:08:57 +00:00
|
|
|
KdbEnterDebuggerException(IN PEXCEPTION_RECORD64 ExceptionRecord,
|
|
|
|
IN KPROCESSOR_MODE PreviousMode,
|
|
|
|
IN OUT PCONTEXT Context,
|
|
|
|
IN BOOLEAN FirstChance);
|
|
|
|
|
2005-03-05 23:35:08 +00:00
|
|
|
/* other functions */
|
|
|
|
|
2023-03-26 00:28:59 +00:00
|
|
|
BOOLEAN
|
|
|
|
NTAPI
|
|
|
|
KdpSafeReadMemory(
|
|
|
|
IN ULONG_PTR Addr,
|
|
|
|
IN LONG Len,
|
|
|
|
OUT PVOID Value
|
|
|
|
);
|
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
NTAPI
|
|
|
|
KdpSafeWriteMemory(
|
|
|
|
IN ULONG_PTR Addr,
|
|
|
|
IN LONG Len,
|
|
|
|
IN ULONGLONG Value
|
|
|
|
);
|
|
|
|
|
2005-07-22 20:52:31 +00:00
|
|
|
NTSTATUS
|
|
|
|
KdbpSafeReadMemory(OUT PVOID Dest,
|
|
|
|
IN PVOID Src,
|
|
|
|
IN ULONG Bytes);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
KdbpSafeWriteMemory(OUT PVOID Dest,
|
|
|
|
IN PVOID Src,
|
|
|
|
IN ULONG Bytes);
|
2005-03-06 02:06:11 +00:00
|
|
|
|
2005-06-25 17:01:17 +00:00
|
|
|
VOID
|
2011-03-16 21:07:25 +00:00
|
|
|
KbdDisableMouse(VOID);
|
2022-07-20 18:31:57 +00:00
|
|
|
|
2005-06-25 17:01:17 +00:00
|
|
|
VOID
|
2011-03-16 21:07:25 +00:00
|
|
|
KbdEnableMouse(VOID);
|
2023-03-29 17:38:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* From kdb_print.c */
|
|
|
|
|
|
|
|
VOID
|
|
|
|
KdbPrintString(
|
|
|
|
_In_ const CSTRING* Output);
|
|
|
|
|
|
|
|
USHORT
|
|
|
|
KdbPromptString(
|
|
|
|
_In_ const CSTRING* PromptString,
|
|
|
|
_Inout_ PSTRING ResponseString);
|
|
|
|
|
|
|
|
VOID
|
|
|
|
KdbPutsN(
|
|
|
|
_In_ PCCH String,
|
|
|
|
_In_ USHORT Length);
|
|
|
|
|
|
|
|
VOID
|
|
|
|
KdbPuts(
|
|
|
|
_In_ PCSTR String);
|
|
|
|
|
|
|
|
VOID
|
|
|
|
__cdecl
|
|
|
|
KdbPrintf(
|
|
|
|
_In_ PCSTR Format,
|
|
|
|
...);
|
|
|
|
|
|
|
|
SIZE_T
|
|
|
|
KdbPrompt(
|
|
|
|
_In_ PCSTR Prompt,
|
|
|
|
_Out_ PCHAR Buffer,
|
|
|
|
_In_ SIZE_T Size);
|