Files
nt-lite/code/public/ntlite/ddk/debug.h
T

29 lines
893 B
C

// Public nt-lite DDK debugging declarations.
#pragma once
#include <ntlite/status.h>
// Driver-visible debug output service table passed through NTL_DDK.
typedef struct NTL_DDK_DEBUG {
void (*Print)(const char* fmt, ...);
} NTL_DDK_DEBUG;
// Current fatal categories used by kernel-mode driver diagnostics.
typedef enum KE_PANIC_CODE {
KE_PANIC_CODE_GENERIC = 0,
KE_PANIC_CODE_FAULT = 1,
KE_PANIC_CODE_IRQL = 2,
KE_PANIC_CODE_SELFTEST = 3,
KE_PANIC_CODE_TRAP = 4,
KE_PANIC_CODE_DRIVER = 5,
KE_PANIC_CODE_INIT = 6,
KE_PANIC_CODE_SCHEDULER = 7,
} KE_PANIC_CODE;
// Emits a formatted debug message on the active kernel debug outputs.
__declspec(dllexport) void DbgPrint(const char* fmt, ...);
// Stops the system with a formatted diagnostic message.
__declspec(dllexport) _Noreturn void KePanic(int code, const char* fmt, ...);