2010-02-26 11:43:19 +00:00
|
|
|
#pragma once
|
2000-01-17 21:02:50 +00:00
|
|
|
|
2013-05-07 00:14:36 +00:00
|
|
|
#include <cportlib/cportlib.h>
|
|
|
|
|
2006-05-10 17:47:44 +00:00
|
|
|
//
|
|
|
|
// Kernel Debugger Port Definition
|
|
|
|
//
|
2005-04-25 14:44:48 +00:00
|
|
|
struct _KD_DISPATCH_TABLE;
|
2013-05-07 00:14:36 +00:00
|
|
|
extern CPPORT GdbPortInfo;
|
2007-01-24 19:48:34 +00:00
|
|
|
extern BOOLEAN KdBreakAfterSymbolLoad;
|
2007-03-05 01:35:43 +00:00
|
|
|
extern BOOLEAN KdPitchDebugger;
|
2009-10-17 14:31:38 +00:00
|
|
|
extern BOOLEAN KdIgnoreUmExceptions;
|
2005-04-25 14:44:48 +00:00
|
|
|
|
2006-05-10 17:47:44 +00:00
|
|
|
BOOLEAN
|
|
|
|
NTAPI
|
|
|
|
KdPortInitializeEx(
|
2013-05-07 00:14:36 +00:00
|
|
|
PCPPORT PortInformation,
|
|
|
|
ULONG ComPortNumber
|
2006-05-10 17:47:44 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
NTAPI
|
|
|
|
KdPortGetByteEx(
|
2013-05-07 00:14:36 +00:00
|
|
|
PCPPORT PortInformation,
|
2013-04-13 21:28:10 +00:00
|
|
|
PUCHAR ByteReceived);
|
2006-05-10 17:47:44 +00:00
|
|
|
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
KdPortPutByteEx(
|
2013-05-07 00:14:36 +00:00
|
|
|
PCPPORT PortInformation,
|
2006-05-10 17:47:44 +00:00
|
|
|
UCHAR ByteToSend
|
|
|
|
);
|
|
|
|
|
2005-04-25 19:42:48 +00:00
|
|
|
/* SYMBOL ROUTINES **********************************************************/
|
2006-05-10 17:47:44 +00:00
|
|
|
#ifdef __NTOSKRNL__
|
2005-04-25 19:42:48 +00:00
|
|
|
|
2009-06-17 12:44:05 +00:00
|
|
|
#if defined(KDBG) || DBG
|
2005-04-25 19:42:48 +00:00
|
|
|
|
2015-09-09 16:06:38 +00:00
|
|
|
#if defined(KDBG)
|
2012-10-01 23:06:32 +00:00
|
|
|
typedef
|
|
|
|
BOOLEAN
|
|
|
|
(NTAPI *PKDBG_CLI_ROUTINE)(
|
|
|
|
IN PCHAR Command,
|
|
|
|
IN ULONG Argc,
|
|
|
|
IN PCH Argv[]);
|
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
NTAPI
|
|
|
|
KdbRegisterCliCallback(
|
|
|
|
PVOID Callback,
|
|
|
|
BOOLEAN Deregister);
|
|
|
|
#endif
|
|
|
|
|
2007-10-31 14:41:27 +00:00
|
|
|
VOID
|
2009-09-09 13:49:04 +00:00
|
|
|
KdbSymProcessSymbols(
|
2009-09-22 21:31:55 +00:00
|
|
|
IN PLDR_DATA_TABLE_ENTRY LdrEntry);
|
|
|
|
|
2005-04-25 19:42:48 +00:00
|
|
|
|
2005-05-09 01:38:29 +00:00
|
|
|
BOOLEAN
|
2009-09-09 13:49:04 +00:00
|
|
|
KdbSymPrintAddress(
|
2011-06-01 20:36:40 +00:00
|
|
|
IN PVOID Address,
|
|
|
|
IN PKTRAP_FRAME Context
|
|
|
|
);
|
2005-04-25 19:42:48 +00:00
|
|
|
|
|
|
|
NTSTATUS
|
2005-06-25 17:01:17 +00:00
|
|
|
KdbSymGetAddressInformation(
|
|
|
|
IN PROSSYM_INFO RosSymInfo,
|
|
|
|
IN ULONG_PTR RelativeAddress,
|
2011-10-08 16:47:57 +00:00
|
|
|
#ifdef __ROS_DWARF__
|
2015-08-28 03:03:26 +00:00
|
|
|
IN PROSSYM_LINEINFO RosSymLineInfo
|
2011-06-01 20:36:40 +00:00
|
|
|
#else
|
2005-06-25 17:01:17 +00:00
|
|
|
OUT PULONG LineNumber OPTIONAL,
|
|
|
|
OUT PCH FileName OPTIONAL,
|
|
|
|
OUT PCH FunctionName OPTIONAL
|
2011-06-01 20:36:40 +00:00
|
|
|
#endif
|
2005-06-25 17:01:17 +00:00
|
|
|
);
|
2005-05-01 09:49:45 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef KDBG
|
2009-09-09 13:49:04 +00:00
|
|
|
# define KdbInit() KdbpCliInit()
|
|
|
|
# define KdbModuleLoaded(FILENAME) KdbpCliModuleLoaded(FILENAME)
|
2005-04-25 19:42:48 +00:00
|
|
|
#else
|
2009-09-09 13:49:04 +00:00
|
|
|
# define KdbEnterDebuggerException(ER, PM, C, TF, F) kdHandleException
|
|
|
|
# define KdbInit() do { } while (0)
|
|
|
|
# define KdbEnter() do { } while (0)
|
|
|
|
# define KdbModuleLoaded(X) do { } while (0)
|
2005-04-25 19:42:48 +00:00
|
|
|
#endif
|
|
|
|
|
2005-04-25 14:44:48 +00:00
|
|
|
/* KD ROUTINES ***************************************************************/
|
2002-02-09 18:41:24 +00:00
|
|
|
|
2002-01-23 23:39:26 +00:00
|
|
|
typedef enum _KD_CONTINUE_TYPE
|
|
|
|
{
|
2005-04-25 14:44:48 +00:00
|
|
|
kdContinue = 0,
|
|
|
|
kdDoNotHandleException,
|
|
|
|
kdHandleException
|
2009-09-09 13:49:04 +00:00
|
|
|
}
|
|
|
|
KD_CONTINUE_TYPE;
|
2002-01-23 23:39:26 +00:00
|
|
|
|
2005-04-25 14:44:48 +00:00
|
|
|
typedef
|
2004-06-23 00:49:22 +00:00
|
|
|
VOID
|
2008-11-29 20:47:48 +00:00
|
|
|
(NTAPI*PKDP_INIT_ROUTINE)(
|
2005-06-25 17:01:17 +00:00
|
|
|
struct _KD_DISPATCH_TABLE *DispatchTable,
|
|
|
|
ULONG BootPhase
|
|
|
|
);
|
2004-06-23 00:49:22 +00:00
|
|
|
|
2005-04-25 14:44:48 +00:00
|
|
|
typedef
|
2004-06-23 00:49:22 +00:00
|
|
|
VOID
|
2008-11-29 20:47:48 +00:00
|
|
|
(NTAPI*PKDP_PRINT_ROUTINE)(
|
- More sharing between ntdll/ntoskrnl: shared Dbg code.
- Added NtCreateDebugObject, NtDebugContinue, NtQueryDebugFilterState, NtSetDebugFilterState, NtWaitForDebugEvent to system call list.
- Added some debug constants to headers
- Updated RtlpCheckForActiveDebugger in ntoskrnl to return whatever we're expecting as the "normal" case.
- Added RtlpSetInDbgPrint to rtl support library for special DbgPrint implementation difference in user-mode
- Removed all the deprecated debug APIs in ntdll.
- Implemented NtQueryDebugFilterState and NtSetDebugFilterState based on royce's implementation.
- Started modifications on KeDebugService, and implemented DebugService in rtl
- Implemented all the Dbg* APIs in RTL.
- Implemented DbgUiConnectToDbg, DbgUiContinue, DbgUiWaitStateChange, DbgUiRemoteBreakin, DbgUiIssueRemoteBreakin
- Changed KD Print callbacks to also receive the length of the string.
Right now, one call that should be shared still isn't (the final DebugPrint call) because calling KeDebugService from kernel-mode seems to cause a hang. Also, DebugService does not currently cause an exception like it should (instead it still calls the Kdp handler), because those changes would've made the patch even bigger and are still untested.
svn path=/trunk/; revision=18078
2005-09-26 04:59:48 +00:00
|
|
|
LPSTR String,
|
|
|
|
ULONG Length
|
|
|
|
);
|
2002-01-23 23:39:26 +00:00
|
|
|
|
2005-04-25 14:44:48 +00:00
|
|
|
typedef
|
2002-01-23 23:39:26 +00:00
|
|
|
VOID
|
2008-11-29 20:47:48 +00:00
|
|
|
(NTAPI*PKDP_PROMPT_ROUTINE)(PCH String);
|
2002-01-23 23:39:26 +00:00
|
|
|
|
2005-04-25 14:44:48 +00:00
|
|
|
typedef
|
2002-01-23 23:39:26 +00:00
|
|
|
KD_CONTINUE_TYPE
|
2008-11-29 20:47:48 +00:00
|
|
|
(NTAPI*PKDP_EXCEPTION_ROUTINE)(
|
2005-06-25 17:01:17 +00:00
|
|
|
PEXCEPTION_RECORD ExceptionRecord,
|
|
|
|
PCONTEXT Context,
|
|
|
|
PKTRAP_FRAME TrapFrame
|
|
|
|
);
|
2004-08-26 16:04:50 +00:00
|
|
|
|
2009-10-17 14:31:38 +00:00
|
|
|
BOOLEAN
|
|
|
|
NTAPI
|
|
|
|
KdIsThisAKdTrap(
|
|
|
|
IN PEXCEPTION_RECORD ExceptionRecord,
|
|
|
|
IN PCONTEXT Context,
|
|
|
|
IN KPROCESSOR_MODE PreviousMode
|
|
|
|
);
|
|
|
|
|
2005-04-25 14:44:48 +00:00
|
|
|
/* INIT ROUTINES *************************************************************/
|
2004-08-26 16:04:50 +00:00
|
|
|
|
2008-08-14 19:30:32 +00:00
|
|
|
BOOLEAN
|
|
|
|
NTAPI
|
|
|
|
KdInitSystem(
|
|
|
|
ULONG Reserved,
|
|
|
|
PLOADER_PARAMETER_BLOCK LoaderBlock
|
|
|
|
);
|
|
|
|
|
2002-07-18 00:25:31 +00:00
|
|
|
VOID
|
2008-11-29 20:47:48 +00:00
|
|
|
NTAPI
|
2005-06-25 17:01:17 +00:00
|
|
|
KdpScreenInit(
|
|
|
|
struct _KD_DISPATCH_TABLE *DispatchTable,
|
|
|
|
ULONG BootPhase
|
|
|
|
);
|
|
|
|
|
|
|
|
VOID
|
2008-11-29 20:47:48 +00:00
|
|
|
NTAPI
|
2005-06-25 17:01:17 +00:00
|
|
|
KdpSerialInit(
|
|
|
|
struct _KD_DISPATCH_TABLE *DispatchTable,
|
|
|
|
ULONG BootPhase
|
|
|
|
);
|
2005-05-09 01:38:29 +00:00
|
|
|
|
2002-07-18 00:25:31 +00:00
|
|
|
VOID
|
2008-11-29 20:47:48 +00:00
|
|
|
NTAPI
|
2005-06-25 17:01:17 +00:00
|
|
|
KdpInitDebugLog(
|
|
|
|
struct _KD_DISPATCH_TABLE *DispatchTable,
|
|
|
|
ULONG BootPhase
|
|
|
|
);
|
2005-05-09 01:38:29 +00:00
|
|
|
|
2002-07-18 00:25:31 +00:00
|
|
|
VOID
|
2008-11-29 20:47:48 +00:00
|
|
|
NTAPI
|
2005-06-25 17:01:17 +00:00
|
|
|
KdpBochsInit(
|
|
|
|
struct _KD_DISPATCH_TABLE *DispatchTable,
|
|
|
|
ULONG BootPhase
|
|
|
|
);
|
|
|
|
|
|
|
|
VOID
|
2008-11-29 20:47:48 +00:00
|
|
|
NTAPI
|
2005-06-25 17:01:17 +00:00
|
|
|
KdpGdbStubInit(
|
|
|
|
struct _KD_DISPATCH_TABLE *DispatchTable,
|
|
|
|
ULONG BootPhase);
|
2005-05-09 01:38:29 +00:00
|
|
|
|
2007-06-28 17:49:02 +00:00
|
|
|
VOID
|
2008-11-29 20:47:48 +00:00
|
|
|
NTAPI
|
2007-07-06 09:02:16 +00:00
|
|
|
KdpKdbgInit(
|
2007-06-28 17:49:02 +00:00
|
|
|
struct _KD_DISPATCH_TABLE *DispatchTable,
|
|
|
|
ULONG BootPhase);
|
|
|
|
|
|
|
|
|
2005-04-25 14:44:48 +00:00
|
|
|
/* KD ROUTINES ***************************************************************/
|
2004-08-26 16:04:50 +00:00
|
|
|
|
2006-09-17 07:06:35 +00:00
|
|
|
BOOLEAN
|
|
|
|
NTAPI
|
|
|
|
KdpCallGdb(
|
|
|
|
IN PKTRAP_FRAME TrapFrame,
|
|
|
|
IN PEXCEPTION_RECORD ExceptionRecord,
|
|
|
|
IN PCONTEXT Context
|
2005-06-25 17:01:17 +00:00
|
|
|
);
|
2005-05-09 01:38:29 +00:00
|
|
|
|
2005-04-25 14:44:48 +00:00
|
|
|
ULONG
|
2008-11-29 20:47:48 +00:00
|
|
|
NTAPI
|
- More sharing between ntdll/ntoskrnl: shared Dbg code.
- Added NtCreateDebugObject, NtDebugContinue, NtQueryDebugFilterState, NtSetDebugFilterState, NtWaitForDebugEvent to system call list.
- Added some debug constants to headers
- Updated RtlpCheckForActiveDebugger in ntoskrnl to return whatever we're expecting as the "normal" case.
- Added RtlpSetInDbgPrint to rtl support library for special DbgPrint implementation difference in user-mode
- Removed all the deprecated debug APIs in ntdll.
- Implemented NtQueryDebugFilterState and NtSetDebugFilterState based on royce's implementation.
- Started modifications on KeDebugService, and implemented DebugService in rtl
- Implemented all the Dbg* APIs in RTL.
- Implemented DbgUiConnectToDbg, DbgUiContinue, DbgUiWaitStateChange, DbgUiRemoteBreakin, DbgUiIssueRemoteBreakin
- Changed KD Print callbacks to also receive the length of the string.
Right now, one call that should be shared still isn't (the final DebugPrint call) because calling KeDebugService from kernel-mode seems to cause a hang. Also, DebugService does not currently cause an exception like it should (instead it still calls the Kdp handler), because those changes would've made the patch even bigger and are still untested.
svn path=/trunk/; revision=18078
2005-09-26 04:59:48 +00:00
|
|
|
KdpPrintString(
|
2017-12-08 13:41:41 +00:00
|
|
|
_In_reads_bytes_(Length) PCHAR UnsafeString,
|
2017-12-14 10:43:57 +00:00
|
|
|
_In_ ULONG Length,
|
|
|
|
_In_ KPROCESSOR_MODE PreviousMode);
|
2005-03-06 10:44:38 +00:00
|
|
|
|
2009-10-23 22:51:39 +00:00
|
|
|
ULONG
|
|
|
|
NTAPI
|
|
|
|
KdpPrompt(
|
2017-12-08 13:39:31 +00:00
|
|
|
_In_reads_bytes_(InStringLength) PCHAR UnsafeInString,
|
|
|
|
_In_ USHORT InStringLength,
|
|
|
|
_Out_writes_bytes_(OutStringLength) PCHAR UnsafeOutString,
|
|
|
|
_In_ USHORT OutStringLength,
|
|
|
|
_In_ KPROCESSOR_MODE PreviousMode
|
2009-10-23 22:51:39 +00:00
|
|
|
);
|
|
|
|
|
2005-04-25 14:44:48 +00:00
|
|
|
BOOLEAN
|
2008-11-29 20:47:48 +00:00
|
|
|
NTAPI
|
2005-04-25 14:44:48 +00:00
|
|
|
KdpDetectConflicts(PCM_RESOURCE_LIST DriverList);
|
2005-05-09 01:38:29 +00:00
|
|
|
|
2005-06-25 17:01:17 +00:00
|
|
|
VOID
|
2008-11-29 20:47:48 +00:00
|
|
|
NTAPI
|
- More sharing between ntdll/ntoskrnl: shared Dbg code.
- Added NtCreateDebugObject, NtDebugContinue, NtQueryDebugFilterState, NtSetDebugFilterState, NtWaitForDebugEvent to system call list.
- Added some debug constants to headers
- Updated RtlpCheckForActiveDebugger in ntoskrnl to return whatever we're expecting as the "normal" case.
- Added RtlpSetInDbgPrint to rtl support library for special DbgPrint implementation difference in user-mode
- Removed all the deprecated debug APIs in ntdll.
- Implemented NtQueryDebugFilterState and NtSetDebugFilterState based on royce's implementation.
- Started modifications on KeDebugService, and implemented DebugService in rtl
- Implemented all the Dbg* APIs in RTL.
- Implemented DbgUiConnectToDbg, DbgUiContinue, DbgUiWaitStateChange, DbgUiRemoteBreakin, DbgUiIssueRemoteBreakin
- Changed KD Print callbacks to also receive the length of the string.
Right now, one call that should be shared still isn't (the final DebugPrint call) because calling KeDebugService from kernel-mode seems to cause a hang. Also, DebugService does not currently cause an exception like it should (instead it still calls the Kdp handler), because those changes would've made the patch even bigger and are still untested.
svn path=/trunk/; revision=18078
2005-09-26 04:59:48 +00:00
|
|
|
KdpBochsDebugPrint(
|
|
|
|
IN PCH Message,
|
|
|
|
IN ULONG Length
|
|
|
|
);
|
2005-06-25 17:01:17 +00:00
|
|
|
|
2008-07-28 14:47:17 +00:00
|
|
|
BOOLEAN
|
2008-11-29 20:47:48 +00:00
|
|
|
NTAPI
|
2008-07-28 14:47:17 +00:00
|
|
|
KdpSafeReadMemory(
|
|
|
|
IN ULONG_PTR Addr,
|
|
|
|
IN LONG Len,
|
|
|
|
OUT PVOID Value
|
|
|
|
);
|
|
|
|
|
|
|
|
BOOLEAN
|
2008-11-29 20:47:48 +00:00
|
|
|
NTAPI
|
2008-07-28 14:47:17 +00:00
|
|
|
KdpSafeWriteMemory(
|
|
|
|
IN ULONG_PTR Addr,
|
|
|
|
IN LONG Len,
|
|
|
|
IN ULONGLONG Value
|
|
|
|
);
|
|
|
|
|
|
|
|
VOID
|
2008-11-29 20:47:48 +00:00
|
|
|
NTAPI
|
2011-03-16 21:07:25 +00:00
|
|
|
KdpEnableSafeMem(VOID);
|
2008-07-28 14:47:17 +00:00
|
|
|
|
|
|
|
|
2005-04-25 14:44:48 +00:00
|
|
|
/* KD GLOBALS ***************************************************************/
|
|
|
|
|
2006-09-17 07:06:35 +00:00
|
|
|
typedef
|
|
|
|
BOOLEAN
|
|
|
|
(NTAPI *PKDEBUG_ROUTINE)(
|
|
|
|
IN PKTRAP_FRAME TrapFrame,
|
|
|
|
IN PKEXCEPTION_FRAME ExceptionFrame,
|
|
|
|
IN PEXCEPTION_RECORD ExceptionRecord,
|
|
|
|
IN PCONTEXT Context,
|
|
|
|
IN KPROCESSOR_MODE PreviousMode,
|
|
|
|
IN BOOLEAN SecondChance
|
|
|
|
);
|
|
|
|
|
2005-04-25 14:44:48 +00:00
|
|
|
/* serial debug connection */
|
|
|
|
#define DEFAULT_DEBUG_PORT 2 /* COM2 */
|
|
|
|
#define DEFAULT_DEBUG_COM1_IRQ 4 /* COM1 IRQ */
|
|
|
|
#define DEFAULT_DEBUG_COM2_IRQ 3 /* COM2 IRQ */
|
|
|
|
#define DEFAULT_DEBUG_BAUD_RATE 115200 /* 115200 Baud */
|
|
|
|
|
|
|
|
/* KD Native Modes */
|
|
|
|
#define KdScreen 0
|
|
|
|
#define KdSerial 1
|
|
|
|
#define KdFile 2
|
2006-01-15 08:49:26 +00:00
|
|
|
#define KdBochs 3
|
2007-07-06 09:02:16 +00:00
|
|
|
#define KdKdbg 4
|
|
|
|
#define KdMax 5
|
2005-04-25 14:44:48 +00:00
|
|
|
|
|
|
|
/* KD Private Debug Modes */
|
|
|
|
typedef struct _KDP_DEBUG_MODE
|
|
|
|
{
|
2005-06-25 17:01:17 +00:00
|
|
|
union
|
|
|
|
{
|
|
|
|
struct
|
|
|
|
{
|
2005-04-25 14:44:48 +00:00
|
|
|
/* Native Modes */
|
|
|
|
UCHAR Screen :1;
|
|
|
|
UCHAR Serial :1;
|
|
|
|
UCHAR File :1;
|
2006-01-15 08:49:26 +00:00
|
|
|
UCHAR Bochs :1;
|
2005-05-09 01:38:29 +00:00
|
|
|
|
2005-04-25 14:44:48 +00:00
|
|
|
/* Currently Supported Wrappers */
|
|
|
|
UCHAR Pice :1;
|
|
|
|
UCHAR Gdb :1;
|
|
|
|
};
|
2005-05-09 01:38:29 +00:00
|
|
|
|
2005-04-25 14:44:48 +00:00
|
|
|
/* Generic Value */
|
|
|
|
ULONG Value;
|
|
|
|
};
|
2009-09-09 13:49:04 +00:00
|
|
|
}
|
|
|
|
KDP_DEBUG_MODE;
|
2005-04-25 14:44:48 +00:00
|
|
|
|
|
|
|
/* KD Internal Debug Services */
|
|
|
|
typedef enum _KDP_DEBUG_SERVICE
|
|
|
|
{
|
2005-06-25 17:01:17 +00:00
|
|
|
DumpNonPagedPool = 0x1e, /* a */
|
|
|
|
ManualBugCheck = 0x30, /* b */
|
|
|
|
DumpNonPagedPoolStats = 0x2e, /* c */
|
|
|
|
DumpNewNonPagedPool = 0x20, /* d */
|
|
|
|
DumpNewNonPagedPoolStats = 0x12, /* e */
|
|
|
|
DumpAllThreads = 0x21, /* f */
|
|
|
|
DumpUserThreads = 0x22, /* g */
|
|
|
|
KdSpare1 = 0x23, /* h */
|
|
|
|
KdSpare2 = 0x17, /* i */
|
|
|
|
KdSpare3 = 0x24, /* j */
|
2009-06-27 09:54:56 +00:00
|
|
|
EnterDebugger = 0x25, /* k */
|
|
|
|
ThatsWhatSheSaid = 69 /* FIGURE IT OUT */
|
2009-09-09 13:49:04 +00:00
|
|
|
}
|
|
|
|
KDP_DEBUG_SERVICE;
|
2005-04-25 14:44:48 +00:00
|
|
|
|
|
|
|
/* Dispatch Table for Wrapper Functions */
|
|
|
|
typedef struct _KD_DISPATCH_TABLE
|
|
|
|
{
|
|
|
|
LIST_ENTRY KdProvidersList;
|
|
|
|
PKDP_INIT_ROUTINE KdpInitRoutine;
|
|
|
|
PKDP_PRINT_ROUTINE KdpPrintRoutine;
|
2005-05-09 01:38:29 +00:00
|
|
|
PKDP_PROMPT_ROUTINE KdpPromptRoutine;
|
2005-04-25 14:44:48 +00:00
|
|
|
PKDP_EXCEPTION_ROUTINE KdpExceptionRoutine;
|
2009-09-09 13:49:04 +00:00
|
|
|
}
|
|
|
|
KD_DISPATCH_TABLE, *PKD_DISPATCH_TABLE;
|
2005-04-25 14:44:48 +00:00
|
|
|
|
|
|
|
/* The current Debugging Mode */
|
|
|
|
extern KDP_DEBUG_MODE KdpDebugMode;
|
|
|
|
|
|
|
|
/* The current Port IRQ */
|
|
|
|
extern ULONG KdpPortIrq;
|
|
|
|
|
|
|
|
/* The current Port */
|
|
|
|
extern ULONG KdpPort;
|
|
|
|
|
|
|
|
/* Port Information for the Serial Native Mode */
|
2013-05-07 00:14:36 +00:00
|
|
|
extern ULONG SerialPortNumber;
|
|
|
|
extern CPPORT SerialPortInfo;
|
2005-04-25 14:44:48 +00:00
|
|
|
|
|
|
|
/* Init Functions for Native Providers */
|
|
|
|
extern PKDP_INIT_ROUTINE InitRoutines[KdMax];
|
|
|
|
|
|
|
|
/* Wrapper Init Function */
|
|
|
|
extern PKDP_INIT_ROUTINE WrapperInitRoutine;
|
2005-05-09 01:38:29 +00:00
|
|
|
|
2005-04-25 14:44:48 +00:00
|
|
|
/* Dispatch Tables for Native Providers */
|
|
|
|
extern KD_DISPATCH_TABLE DispatchTable[KdMax];
|
|
|
|
|
|
|
|
/* Dispatch Table for the Wrapper */
|
|
|
|
extern KD_DISPATCH_TABLE WrapperTable;
|
2005-05-09 01:38:29 +00:00
|
|
|
|
2005-04-25 14:44:48 +00:00
|
|
|
/* The KD Native Provider List */
|
|
|
|
extern LIST_ENTRY KdProviders;
|
2002-07-18 00:25:31 +00:00
|
|
|
|
2005-10-09 00:45:33 +00:00
|
|
|
/* Whether to enter KDB as early as possible or not */
|
|
|
|
extern BOOLEAN KdpEarlyBreak;
|
|
|
|
|
2006-09-17 07:06:35 +00:00
|
|
|
extern PKDEBUG_ROUTINE KiDebugRoutine;
|
2009-11-02 17:45:51 +00:00
|
|
|
extern KD_CONTEXT KdpContext;
|
|
|
|
extern ULONG Kd_WIN2000_Mask;
|
2006-09-17 07:06:35 +00:00
|
|
|
|
2006-05-10 17:47:44 +00:00
|
|
|
#endif
|
2011-02-19 21:50:11 +00:00
|
|
|
|
2015-08-28 14:01:58 +00:00
|
|
|
#if DBG && defined(_M_IX86) && !defined(_WINKD_) // See ke/i386/traphdlr.c
|
2011-02-19 21:50:11 +00:00
|
|
|
#define ID_Win32PreServiceHook 'WSH0'
|
|
|
|
#define ID_Win32PostServiceHook 'WSH1'
|
|
|
|
typedef void (NTAPI *PKDBG_PRESERVICEHOOK)(ULONG, PULONG_PTR);
|
|
|
|
typedef ULONG_PTR (NTAPI *PKDBG_POSTSERVICEHOOK)(ULONG, ULONG_PTR);
|
|
|
|
extern PKDBG_PRESERVICEHOOK KeWin32PreServiceHook;
|
|
|
|
extern PKDBG_POSTSERVICEHOOK KeWin32PostServiceHook;
|
|
|
|
#endif
|