Debugging Tools for Windows |
The AttachKernel and AttachKernelWide methods connect the debugger engine to a kernel target.
HRESULT
IDebugClient::AttachKernel(
IN ULONG Flags,
IN OPTIONAL PCSTR ConnectOptions
);
HRESULT
IDebugClient5::AttachKernelWide(
IN ULONG Flags,
IN OPTIONAL PCWSTR ConnectOptions
);
#ifdef UNICODE
#define AttachKernelT AttachKernelWide
#else
#define AttachKernelT AttachKernel
#endif
Value | Description |
---|---|
DEBUG_ATTACH_KERNEL_CONNECTION | Attach to the kernel on the target computer. |
DEBUG_ATTACH_LOCAL_KERNEL | Attach to the local kernel. To check whether this option is available, use IsKernelDebuggerEnabled. |
DEBUG_ATTACH_EXDI_DRIVER | Attach to a kernel by using an eXDI driver. |
This method may also return error values. See Return Values for more details.
AttachKernel is available in all versions of IDebugClient. AttachKernelWide is available in IDebugClient5 and later versions.
Local debugging and debugging over an IEEE 1394 cable are supported only on Windows XP and later versions of Windows. Both the target computer and the host computer must be running one of these Windows versions, but not necessarily the same one.
Note The engine doesn't completely attach to the kernel until the WaitForEvent method has been called. Only after the kernel has generated an event — for example, the initial breakpoint — does it become available in the debugger session.
For more information about connecting to live kernel-mode targets, see Live Kernel-Mode Targets.
Headers: Defined in dbgeng.h. Include dbgeng.h.
GetKernelConnectionOptions, AttachProcess, IsKernelDebuggerEnabled