Post · 2 min read· pp. 2459–2460

NTDBG.H

The public symbol file NTKRPAMP.PDB for the original release of Windows 10 tells that the kernel is built with the NTDBG.H header at

d:\th.public.fre\halkit\inc

and draws from it the following type definitions:

Line NumberType
119struct _DBGKM_EXCEPTION32
124struct _DBGKM_EXCEPTION64
3469struct _X86_DBGKD_CONTROL_SET
3482struct _IA64_DBGKD_CONTROL_SET
3488struct _AMD64_DBGKD_CONTROL_SET
3495struct _ARM_DBGKD_CONTROL_SET
3501struct _ARM64_DBGKD_CONTROL_SET
3508struct _ARMCE_DBGKD_CONTROL_SET
3514struct _PPC_DBGKD_CONTROL_SET
3521struct _DBGKD_ANY_CONTROL_SET
3631struct _X86_KTRAP_FRAME
3739struct _X86_KTRAP_FRAME_BLUE
5237struct _DBGKD_LOAD_SYMBOLS32
5246struct _DBGKD_LOAD_SYMBOLS64
5455struct _DBGKD_READ_MEMORY32
5461struct _DBGKD_READ_MEMORY64
5499struct _DBGKD_WRITE_MEMORY32
5505struct _DBGKD_WRITE_MEMORY64
5543struct _DBGKD_GET_CONTEXT
5551struct _DBGKD_SET_CONTEXT
5555struct _DBGKD_CONTEXT_EX
5563struct _DBGKD_WRITE_BREAKPOINT32
5568struct _DBGKD_WRITE_BREAKPOINT64
5573struct _DBGKD_WRITE_CUSTOM_BREAKPOINT
5607struct _DBGKD_RESTORE_BREAKPOINT
5611struct _DBGKD_BREAKPOINTEX
5616struct _DBGKD_CONTINUE
5625struct _DBGKD_CONTINUE2
5638struct _DBGKD_READ_WRITE_IO32
5644struct _DBGKD_READ_WRITE_IO64
5678struct _DBGKD_READ_WRITE_IO_EXTENDED32
5687struct _DBGKD_READ_WRITE_IO_EXTENDED64
5730struct _DBGKD_READ_WRITE_MSR
5737struct _DBGKD_QUERY_SPECIAL_CALLS
5742struct _DBGKD_SET_SPECIAL_CALL32
5746struct _DBGKD_SET_SPECIAL_CALL64
5766struct _DBGKD_SET_INTERNAL_BREAKPOINT32
5781struct _DBGKD_SET_INTERNAL_BREAKPOINT64
5791struct _DBGKD_GET_INTERNAL_BREAKPOINT32
5801struct _DBGKD_GET_INTERNAL_BREAKPOINT64
5868struct _DBGKD_SEARCH_MEMORY
5878struct _DBGKD_GET_SET_BUS_DATA
5890struct _DBGKD_FILL_MEMORY
5912struct _DBGKD_QUERY_MEMORY
5923struct _DBGKD_SWITCH_PARTITION
5930struct _DBGKD_MANIPULATE_STATE32
5935unnamed union u in _DBGKD_MANIPULATE_STATE32
5964struct _DBGKD_MANIPULATE_STATE64
5969unnamed union u in _DBGKD_MANIPULATE_STATE64

The header NTDBG.H is not known in any Device Driver Kit (DDK) or Windows Driver Kit (WDK). That said, many of the structures are well known from a different header, named WINDBGKD.H, that Microsoft supplied among the directories of sample code up to and including the DDK for Windows NT 4.0 and in the ordinary INC directory in the DDK for Windows 2000. Then, it appears to have been withdrawn from publication. This was concurrent with an extensive reworking of all levels of debugger support in Windows XP, notably the unification of debuggers as interface layers above a Debugger Engine (DBGENG.DLL) and the explicit provision for kernel-mode debugging over transports other than a serial port. All this presumably had as a (welcome) consequence that the details of the kernel’s interaction with the debugger no longer should be any benefit to third-party programmers who sought to add to the built-in debugger support.