mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 22:55:41 +00:00
- Move more stuff to wdm.h
- DbgPrint(Ex) : PCCH Format -> PCSTR Format - Add NTSYSAPI to vDbgPrintEx(WithPrefix) - DbgPrintReturnControlC and Dbg{Set,Query}DebugFilterState : NTKERNELAPI -> NTSYSAPI - Add vKdPrintExWithPrefix definition - Improve the conditions around KdDebuggerEnabled and KdDebuggerNotPresent definitions svn path=/branches/header-work/; revision=45890
This commit is contained in:
parent
775b7007f8
commit
f7910da58e
2 changed files with 217 additions and 201 deletions
|
@ -9865,6 +9865,223 @@ ZwWriteFile(
|
|||
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
* WMI Library Support Functions *
|
||||
******************************************************************************/
|
||||
|
||||
#ifdef RUN_WPP
|
||||
|
||||
#if (NTDDI_VERSION >= NTDDI_WINXP)
|
||||
NTKERNELAPI
|
||||
NTSTATUS
|
||||
DDKCDECLAPI
|
||||
WmiTraceMessage(
|
||||
IN TRACEHANDLE LoggerHandle,
|
||||
IN ULONG MessageFlags,
|
||||
IN LPGUID MessageGuid,
|
||||
IN USHORT MessageNumber,
|
||||
IN ...);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if (NTDDI_VERSION >= NTDDI_WINXP)
|
||||
|
||||
NTKERNELAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
WmiQueryTraceInformation(
|
||||
IN TRACE_INFORMATION_CLASS TraceInformationClass,
|
||||
OUT PVOID TraceInformation,
|
||||
IN ULONG TraceInformationLength,
|
||||
OUT PULONG RequiredLength OPTIONAL,
|
||||
IN PVOID Buffer OPTIONAL);
|
||||
|
||||
#if 0
|
||||
/* FIXME: Get va_list from where? */
|
||||
NTKERNELAPI
|
||||
NTSTATUS
|
||||
DDKCDECLAPI
|
||||
WmiTraceMessageVa(
|
||||
IN TRACEHANDLE LoggerHandle,
|
||||
IN ULONG MessageFlags,
|
||||
IN LPGUID MessageGuid,
|
||||
IN USHORT MessageNumber,
|
||||
IN va_list MessageArgList);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
* Kernel Debugger Functions *
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef _DBGNT_
|
||||
ULONG
|
||||
DDKCDECLAPI
|
||||
DbgPrint(
|
||||
IN PCSTR Format,
|
||||
IN ...);
|
||||
#endif
|
||||
|
||||
#if DBG
|
||||
|
||||
#define KdPrint(_x_) DbgPrint _x_
|
||||
#define KdPrintEx(_x_) DbgPrintEx _x_
|
||||
#define vKdPrintExWithPrefix(_x_) vDbgPrintExWithPrefix _x_
|
||||
#define KdBreakPoint() DbgBreakPoint()
|
||||
#define KdBreakPointWithStatus(s) DbgBreakPointWithStatus(s)
|
||||
|
||||
#else /* !DBG */
|
||||
|
||||
#define KdPrint(_x_)
|
||||
#define KdPrintEx(_x_)
|
||||
#define vKdPrintExWithPrefix(_x_)
|
||||
#define KdBreakPoint()
|
||||
#define KdBreakPointWithStatus(s)
|
||||
|
||||
#endif /* !DBG */
|
||||
|
||||
#if defined(__GNUC__)
|
||||
|
||||
extern NTKERNELAPI BOOLEAN KdDebuggerNotPresent;
|
||||
extern NTKERNELAPI BOOLEAN KdDebuggerEnabled;
|
||||
#define KD_DEBUGGER_ENABLED KdDebuggerEnabled
|
||||
#define KD_DEBUGGER_NOT_PRESENT KdDebuggerNotPresent
|
||||
|
||||
#elif defined(_NTDDK_) || defined(_NTIFS_) || defined(_NTHAL_) || defined(_WDMDDK_) || defined(_NTOSP_)
|
||||
|
||||
extern NTKERNELAPI PBOOLEAN KdDebuggerNotPresent;
|
||||
extern NTKERNELAPI PBOOLEAN KdDebuggerEnabled;
|
||||
#define KD_DEBUGGER_ENABLED *KdDebuggerEnabled
|
||||
#define KD_DEBUGGER_NOT_PRESENT *KdDebuggerNotPresent
|
||||
|
||||
#else
|
||||
|
||||
extern BOOLEAN KdDebuggerNotPresent;
|
||||
extern BOOLEAN KdDebuggerEnabled;
|
||||
#define KD_DEBUGGER_ENABLED KdDebuggerEnabled
|
||||
#define KD_DEBUGGER_NOT_PRESENT KdDebuggerNotPresent
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef _VA_LIST_DEFINED
|
||||
#if (NTDDI_VERSION >= NTDDI_WINXP)
|
||||
|
||||
NTSYSAPI
|
||||
ULONG
|
||||
NTAPI
|
||||
vDbgPrintEx(
|
||||
IN ULONG ComponentId,
|
||||
IN ULONG Level,
|
||||
IN PCCH Format,
|
||||
IN va_list ap);
|
||||
|
||||
NTSYSAPI
|
||||
ULONG
|
||||
NTAPI
|
||||
vDbgPrintExWithPrefix(
|
||||
IN PCCH Prefix,
|
||||
IN ULONG ComponentId,
|
||||
IN ULONG Level,
|
||||
IN PCCH Format,
|
||||
IN va_list ap);
|
||||
|
||||
#endif
|
||||
#endif // _VA_LIST_DEFINED
|
||||
|
||||
#if (NTDDI_VERSION >= NTDDI_WIN2K)
|
||||
|
||||
NTKERNELAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
KdDisableDebugger(
|
||||
VOID);
|
||||
|
||||
NTKERNELAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
KdEnableDebugger(
|
||||
VOID);
|
||||
|
||||
#if (_MSC_FULL_VER >= 150030729) && !defined(IMPORT_NATIVE_DBG_BREAK)
|
||||
#define DbgBreakPoint __debugbreak
|
||||
#else
|
||||
VOID
|
||||
NTAPI
|
||||
DbgBreakPoint(
|
||||
VOID);
|
||||
#endif
|
||||
|
||||
NTSYSAPI
|
||||
VOID
|
||||
NTAPI
|
||||
DbgBreakPointWithStatus(
|
||||
IN ULONG Status);
|
||||
|
||||
NTSYSAPI
|
||||
ULONG
|
||||
DDKCDECLAPI
|
||||
DbgPrintReturnControlC(
|
||||
IN PCCH Format,
|
||||
IN ...);
|
||||
|
||||
#endif
|
||||
|
||||
#if (NTDDI_VERSION >= NTDDI_WINXP)
|
||||
|
||||
NTSYSAPI
|
||||
ULONG
|
||||
DDKCDECLAPI
|
||||
DbgPrintEx(
|
||||
IN ULONG ComponentId,
|
||||
IN ULONG Level,
|
||||
IN PCSTR Format,
|
||||
IN ...);
|
||||
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
DbgQueryDebugFilterState(
|
||||
IN ULONG ComponentId,
|
||||
IN ULONG Level);
|
||||
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
DbgSetDebugFilterState(
|
||||
IN ULONG ComponentId,
|
||||
IN ULONG Level,
|
||||
IN BOOLEAN State);
|
||||
|
||||
#endif
|
||||
|
||||
#if (NTDDI_VERSION >= NTDDI_WS03)
|
||||
|
||||
NTKERNELAPI
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
KdRefreshDebuggerNotPresent(
|
||||
VOID
|
||||
);
|
||||
|
||||
#endif
|
||||
|
||||
#if (NTDDI_VERSION >= NTDDI_WS03SP1)
|
||||
NTKERNELAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
KdChangeOption(
|
||||
IN KD_OPTION Option,
|
||||
IN ULONG InBufferBytes OPTIONAL,
|
||||
IN PVOID InBuffer,
|
||||
IN ULONG OutBufferBytes OPTIONAL,
|
||||
OUT PVOID OutBuffer,
|
||||
OUT PULONG OutBufferNeeded OPTIONAL);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* Unsorted *
|
||||
******************************************************************************/
|
||||
|
|
|
@ -3631,37 +3631,6 @@ NTAPI
|
|||
PoRequestShutdownEvent(
|
||||
OUT PVOID *Event);
|
||||
|
||||
|
||||
|
||||
|
||||
NTKERNELAPI
|
||||
POWER_STATE
|
||||
NTAPI
|
||||
PoSetPowerState(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN POWER_STATE_TYPE Type,
|
||||
IN POWER_STATE State);
|
||||
|
||||
NTKERNELAPI
|
||||
VOID
|
||||
NTAPI
|
||||
PoSetSystemState(
|
||||
IN EXECUTION_STATE Flags);
|
||||
|
||||
NTKERNELAPI
|
||||
VOID
|
||||
NTAPI
|
||||
PoStartNextPowerIrp(
|
||||
IN OUT PIRP Irp);
|
||||
|
||||
NTKERNELAPI
|
||||
VOID
|
||||
NTAPI
|
||||
PoUnregisterSystemState(
|
||||
IN OUT PVOID StateHandle);
|
||||
|
||||
|
||||
|
||||
/** WMI library support routines **/
|
||||
|
||||
NTSTATUS
|
||||
|
@ -3682,16 +3651,6 @@ WmiFireEvent(
|
|||
IN ULONG EventDataSize,
|
||||
IN PVOID EventData);
|
||||
|
||||
NTKERNELAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
WmiQueryTraceInformation(
|
||||
IN TRACE_INFORMATION_CLASS TraceInformationClass,
|
||||
OUT PVOID TraceInformation,
|
||||
IN ULONG TraceInformationLength,
|
||||
OUT PULONG RequiredLength OPTIONAL,
|
||||
IN PVOID Buffer OPTIONAL);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
WmiSystemControl(
|
||||
|
@ -3700,114 +3659,8 @@ WmiSystemControl(
|
|||
IN PIRP Irp,
|
||||
OUT PSYSCTL_IRP_DISPOSITION IrpDisposition);
|
||||
|
||||
NTKERNELAPI
|
||||
NTSTATUS
|
||||
DDKCDECLAPI
|
||||
WmiTraceMessage(
|
||||
IN TRACEHANDLE LoggerHandle,
|
||||
IN ULONG MessageFlags,
|
||||
IN LPGUID MessageGuid,
|
||||
IN USHORT MessageNumber,
|
||||
IN ...);
|
||||
|
||||
#if 0
|
||||
/* FIXME: Get va_list from where? */
|
||||
NTKERNELAPI
|
||||
NTSTATUS
|
||||
DDKCDECLAPI
|
||||
WmiTraceMessageVa(
|
||||
IN TRACEHANDLE LoggerHandle,
|
||||
IN ULONG MessageFlags,
|
||||
IN LPGUID MessageGuid,
|
||||
IN USHORT MessageNumber,
|
||||
IN va_list MessageArgList);
|
||||
#endif
|
||||
|
||||
|
||||
/** Kernel debugger routines **/
|
||||
|
||||
NTKERNELAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
KdDisableDebugger(
|
||||
VOID);
|
||||
|
||||
NTKERNELAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
KdEnableDebugger(
|
||||
VOID);
|
||||
|
||||
NTKERNELAPI
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
KdRefreshDebuggerNotPresent(
|
||||
VOID
|
||||
);
|
||||
|
||||
#if (NTDDI_VERSION >= NTDDI_WS03SP1)
|
||||
NTKERNELAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
KdChangeOption(
|
||||
IN KD_OPTION Option,
|
||||
IN ULONG InBufferBytes OPTIONAL,
|
||||
IN PVOID InBuffer,
|
||||
IN ULONG OutBufferBytes OPTIONAL,
|
||||
OUT PVOID OutBuffer,
|
||||
OUT PULONG OutBufferNeeded OPTIONAL);
|
||||
#endif
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
DbgBreakPoint(
|
||||
VOID);
|
||||
|
||||
NTSYSAPI
|
||||
VOID
|
||||
NTAPI
|
||||
DbgBreakPointWithStatus(
|
||||
IN ULONG Status);
|
||||
|
||||
ULONG
|
||||
DDKCDECLAPI
|
||||
DbgPrint(
|
||||
IN PCCH Format,
|
||||
IN ...);
|
||||
|
||||
NTSYSAPI
|
||||
ULONG
|
||||
DDKCDECLAPI
|
||||
DbgPrintEx(
|
||||
IN ULONG ComponentId,
|
||||
IN ULONG Level,
|
||||
IN PCCH Format,
|
||||
IN ...);
|
||||
|
||||
ULONG
|
||||
NTAPI
|
||||
vDbgPrintEx(
|
||||
IN ULONG ComponentId,
|
||||
IN ULONG Level,
|
||||
IN PCCH Format,
|
||||
IN va_list ap);
|
||||
|
||||
ULONG
|
||||
NTAPI
|
||||
vDbgPrintExWithPrefix(
|
||||
IN PCCH Prefix,
|
||||
IN ULONG ComponentId,
|
||||
IN ULONG Level,
|
||||
IN PCCH Format,
|
||||
IN va_list ap);
|
||||
|
||||
NTKERNELAPI
|
||||
ULONG
|
||||
DDKCDECLAPI
|
||||
DbgPrintReturnControlC(
|
||||
IN PCCH Format,
|
||||
IN ...);
|
||||
|
||||
ULONG
|
||||
NTAPI
|
||||
DbgPrompt(
|
||||
|
@ -3816,60 +3669,6 @@ DbgPrompt(
|
|||
IN ULONG MaximumResponseLength
|
||||
);
|
||||
|
||||
NTKERNELAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
DbgQueryDebugFilterState(
|
||||
IN ULONG ComponentId,
|
||||
IN ULONG Level);
|
||||
|
||||
NTKERNELAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
DbgSetDebugFilterState(
|
||||
IN ULONG ComponentId,
|
||||
IN ULONG Level,
|
||||
IN BOOLEAN State);
|
||||
|
||||
#if DBG
|
||||
|
||||
#define KdPrint(_x_) DbgPrint _x_
|
||||
#define KdPrintEx(_x_) DbgPrintEx _x_
|
||||
#define KdBreakPoint() DbgBreakPoint()
|
||||
#define KdBreakPointWithStatus(s) DbgBreakPointWithStatus(s)
|
||||
|
||||
#else /* !DBG */
|
||||
|
||||
#define KdPrint(_x_)
|
||||
#define KdPrintEx(_x_)
|
||||
#define KdBreakPoint()
|
||||
#define KdBreakPointWithStatus(s)
|
||||
|
||||
#endif /* !DBG */
|
||||
|
||||
#if defined(__GNUC__)
|
||||
|
||||
extern NTKERNELAPI BOOLEAN KdDebuggerNotPresent;
|
||||
extern NTKERNELAPI BOOLEAN KdDebuggerEnabled;
|
||||
#define KD_DEBUGGER_ENABLED KdDebuggerEnabled
|
||||
#define KD_DEBUGGER_NOT_PRESENT KdDebuggerNotPresent
|
||||
|
||||
#elif defined(_NTDDK_) || defined(_NTHAL_) || defined(_WDMDDK_) || defined(_NTOSP_)
|
||||
|
||||
extern NTKERNELAPI PBOOLEAN KdDebuggerNotPresent;
|
||||
extern NTKERNELAPI PBOOLEAN KdDebuggerEnabled;
|
||||
#define KD_DEBUGGER_ENABLED *KdDebuggerEnabled
|
||||
#define KD_DEBUGGER_NOT_PRESENT *KdDebuggerNotPresent
|
||||
|
||||
#else
|
||||
|
||||
extern BOOLEAN KdDebuggerNotPresent;
|
||||
extern BOOLEAN KdDebuggerEnabled;
|
||||
#define KD_DEBUGGER_ENABLED KdDebuggerEnabled
|
||||
#define KD_DEBUGGER_NOT_PRESENT KdDebuggerNotPresent
|
||||
|
||||
#endif
|
||||
|
||||
/** Stuff from winnt4.h */
|
||||
|
||||
#ifndef DMA_MACROS_DEFINED
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue