Share via


Kernel Debugger IOCTLs (Compact 2013)

10/16/2014

The kernel debugger supports both hardware and software breakpoints. The software breakpoint features require no additional OEM action or code. The hardware breakpoint features require the OEM to implement kernel debugger IOCTLs. The OEM may omit a group of IOCTLs where support is not required, and omit individual IOCTLs, as indicated by the "Status" columns in the tables in this topic.

Software Breakpoints

Software breakpoints operate with no additional OEM action or code. However, they require substantially more overhead than hardware breakpoints. Software breakpoints do not require IOCTL implementation because the kernel debugger does not call IOCTLs to support software breakpoints, which it manages independently of the debug target.

Hardware Breakpoints: OEM Implementation

Hardware breakpoints require the OEM to implement IOCTLs specific to their platform as described in this section. The OEM must implement the control IOCTLs to support any Platform Builder hardware kernel debugger functions, and can implement the code and data IOCTLs or data IOCTLs or both as they require. Moreover, the OEM must implement these IOCTLs because the implementation is specific to each hardware platform.

Hardware breakpoints perform significantly faster than software breakpoints, and may be required for debugging time-sensitive logic.

Breakpoint Function Groups

The kernel debugger IOCTLs are divided into three breakpoint function groups: control, code, and data.

Kernel Debugger Breakpoints: Control IOCTLs

The following table shows the IOCTLs that control kernel debugger breakpoints. These IOCTLs are prerequisites to the code breakpoint IOCTLs and data breakpoint IOCTLs.

IOCTL

Status

Description

KD_IOCTL_KERNEL_CONTINUE

Optional

Notifies the BSP that the kernel debugger is about to wake the device from a previous KD_IOCTL_KERNEL_HALT.

KD_IOCTL_DMPGEN_END

Required

Indicates end of error report dump generation.

KD_IOCTL_DMPGEN_START

Required

Indicates start of error report dump generation.

KD_IOCTL_INIT

Required

Initializes the kernel debugger.

KD_IOCTL_KERNEL_HALT

Optional

Notifies the BSP that the kernel debugger is about to halt the device.

KD_IOCTL_JIT_NOTIF

Required

Indicates that just-in-time (JIT) debugging has started.

KD_IOCTL_MEMORY_INACCESSIBLE

Required

Checks accessibility status of a memory location.

KD_IOCTL_RESET

Required

Resets the device.

Kernel Debugger Breakpoints: Code Breakpoint IOCTLs

The following table shows the IOCTLs that support the kernel debugger code breakpoints.

IOCTL

Status

Description

KD_IOCTL_CLEAR_CBP

Required

Clears a code breakpoint.

KD_IOCTL_ENUM_CBP

Reserved. Do not implement.

Enumerates the code breakpoints that are set.

KD_IOCTL_QUERY_CBP

Required

Queries the number of hardware code breakpoints that are available.

KD_IOCTL_SET_CBP

Required

Sets a code breakpoint.

Kernel Debugger Breakpoints: Data Breakpoint IOCTLs

The following table shows the IOCTLs that support the kernel debugger data breakpoints.

IOCTL

Status

Description

KD_IOCTL_CLEAR_DBP

Required

Clears a data breakpoint.

KD_IOCTL_ENUM_DBP

Reserved. Do not implement.

Enumerates the data breakpoints that are set.

KD_IOCTL_QUERY_DBP

Required

Queries the number of hardware data breakpoints that are available.

KD_IOCTL_SET_DBP

Required

Sets a data breakpoint.

KD_IOCTL_MAP_EXCEPTION

Required for x86 hardware.

Optional otherwise.

Maps an exception code to a different code.

Kernel Debugger Breakpoints: Data Structures

The following table shows the structures that support the kernel debugger data breakpoints.

Structure

Description

KD_BPINFO

Contains breakpoint information, used by the OEMKDIoctl function.

KD_EXCEPTION_INFO

Contains exception code information, used by KD_IOCTL_MAP_EXCEPTION.

See Also

Reference

OAL IOCTLs