PWINDBG_IOCTL_ROUTINE callback function (wdbgexts.h)
The PWINDBG_IOCTL_ROUTINE (Ioctl) function performs a variety of different operations. Much of its functionality mirrors the functionality of other functions in wdbgexts.h.
Syntax
PWINDBG_IOCTL_ROUTINE PwindbgIoctlRoutine;
ULONG PwindbgIoctlRoutine(
USHORT IoctlType,
PVOID lpvData,
ULONG cbSize
)
{...}
Parameters
IoctlType
Specifies which Ioctl operation to perform. For a list of possible IoctlType values, see the "Remarks" section.
lpvData
Points to the address of a data structure. The type of structure that is required depends on the value of IoctlType.
cbSize
Specifies the size of the structure that lpvData points to.
Return value
The meaning of return value depends on IoctlType. See the page for the corresponding Ioctl operation for the meaning of the return value.
Remarks
The Ioctl function is the entry point for many of the functionalities supplied for WdbgExts extensions. Many of the other functions in wdbgexts.h are simply wrappers for calls to Ioctl.
The following table lists the possible IoctlType values. If the IoctlType corresponds to another function, that function is provided; otherwise, a link to the page describing the Ioctl operation is provided.
IoctlType constant | Equivalent function | lpData structure |
---|---|---|
IG_KD_CONTEXT | ||
IG_READ_CONTROL_SPACE |
ReadControlSpace64 |
|
IG_WRITE_CONTROL_SPACE | WriteControlSpace | |
IG_READ_IO_SPACE |
ReadIoSpace64 |
|
IG_WRITE_IO_SPACE |
WriteIoSpace64 |
|
IG_READ_PHYSICAL | ||
IG_WRITE_PHYSICAL | ||
IG_READ_IO_SPACE_EX |
ReadIoSpaceEx64 |
|
IG_WRITE_IO_SPACE_EX |
WriteIoSpaceEx64 |
|
IG_SET_THREAD |
SetThreadForOperation64 |
|
IG_READ_MSR | ||
IG_WRITE_MSR | ||
IG_GET_DEBUGGER_DATA | ||
IG_GET_KERNEL_VERSION |
||
IG_RELOAD_SYMBOLS | ReloadSymbols | |
IG_GET_SET_SYMPATH | ||
IG_GET_EXCEPTION_RECORD | ||
IG_IS_PTR64 | IsPtr64 | |
IG_GET_BUS_DATA |
||
IG_SET_BUS_DATA |
||
IG_LOWMEM_CHECK |
See Remarks. | |
IG_SEARCH_MEMORY | SearchMemory | |
IG_GET_CURRENT_THREAD | GetCurrentThreadAddr | |
IG_GET_CURRENT_PROCESS | GetCurrentProcessAddr | |
IG_GET_TYPE_SIZE | GetTypeSize | |
IG_GET_CURRENT_PROCESS_HANDLE | GetCurrentProcessHandle | |
IG_GET_INPUT_LINE | GetInputLine | |
IG_GET_EXPRESSION_EX | GetExpressionEx | |
IG_TRANSLATE_VIRTUAL_TO_PHYSICAL | TranslateVirtualToPhysical | |
IG_GET_CACHE_SIZE | GetDebuggerCacheSize | |
IG_READ_PHYSICAL_WITH_FLAGS | ReadPhysicalWithFlags | |
IG_WRITE_PHYSICAL_WITH_FLAGS | WritePhysicalWithFlags | |
IG_POINTER_SEARCH_PHYSICAL |
||
IG_GET_THREAD_OS_INFO |
||
IG_GET_CLR_DATA_INTERFACE | ||
IG_GET_TEB_ADDRESS | GetTebAddress | |
IG_GET_PEB_ADDRESS | GetPebAddress |
The IG_LOWMEM_CHECK Ioctl operation looks for memory corruption in the low 4 GB of memory.
This Ioctl operation does not take any parameters and the lpvData and cbSizeOfContext parameters should be set to NULL and zero respectively.
Return Value
If no corrupt memory was found, the return value is TRUE; otherwise, it is FALSE.This operation is only available in kernel-mode debugging, and is only useful when the kernel was started using the /nolowmem option.
When the kernel is started with the /nolowmem option, the kernel, drivers, operating system, and applications are loaded in memory above 4 GB, while the low 4 GB of memory is filled with a unique pattern. The IG_LOWMEM_CHECK Ioctl operation checks this pattern for corruption.
This can be used to verify that a driver works correctly when using physical addresses greater than 32 bits in length. See Physical Address Extension (PAE), /pae, and /nolowmem in the Windows Driver Kit.
Requirements
Requirement | Value |
---|---|
Target Platform | Desktop |
Header | wdbgexts.h (include Wdbgexts.h, Dbgeng.h) |