OEMKDIoControl (Windows Embedded CE 6.0)
1/5/2010
This function is implemented by the OEM to support requests from the kernel debugger.
Syntax
BOOL OEMKDIoControl(
DWORD dwIoControlCode,
LPVOID lpBuf,
DWORD nBufSize
);
Parameters
dwIoControlCode
[in] Specifies the function requested by the kernel debugger.This parameter can be set to one of the values listed in the following table.
Control code Value Description 0x00000000
Initializes the kernel debugger.
0x00000001
Sets a code breakpoint.
The ulAddress member of the KD_BPINFO structure is set to the address to write the breakpoint.
The OEM sets the ulHandle member to the handle of the breakpoint.
0x00000002
Clears a code breakpoint.
The OEM sets the ulHandle member of KD_BPINFO to the handle of the breakpoint to be cleared.
0x00000003
Queries the number of code breakpoints available.
The OEM sets the ulCount member of KD_BPINFO to the number of code breakpoints available.
0x00000004
Enumerates the code breakpoints that are set.
The ulCount member of KD_BPINFO is incremented from 0 to n, where n is the number of available breakpoints.
0x00000010
Sets a data breakpoint.
The ulAddress member of KD_BPINFO is set to the address to write the breakpoint.
The OEM sets the ulHandle member of KD_BPINFO to the handle of the breakpoint.
0x00000011
Clears a data breakpoint.
The OEM sets the ulHandle member of KD_BPINFO to the handle of the breakpoint to be cleared.
0x00000012
Queries the number of data breakpoints available.
The OEM sets the ulCount parameter to the number of code breakpoints available.
0x00000013
Enumerates the data breakpoints that are set.
The ulCount parameter is incremented from 0 to n, where n is the number of available breakpoints.
0x00000020
Maps an exception code to a different code.
0x00000030
Resets the kernel debugger.
0x00000040
Notifies the JIT debugger.
0x00000050
Starts error report dump generation.
0x00000051
Ends error report dump generation.
0x00000060
Indicates that memory is inaccessible.
For more information, see Kernel Debugger IOCTLs.
- lpBuf
[out] Pointer to a buffer that allocates space for a KD_BPINFO structure.
nBufSize
[in] Size of the buffer pointed to by lpInBuf.This is set to the size of the KD_BPINFO structure.
Return Value
If this function succeeds, it returns TRUE.
If this function fails, it returns FALSE.
Remarks
This is a restrictive form of the KernelIoControl routine. The context in which the kernel debugger calls this function requires that the OEM operates on the hardware only and does not perform system calls.
The kernel debugger exports a function pointer called pKDIoControl. The OEM must assign the address of the function that handles the IOCTL to this pointer. The assignment must occur immediately when OEMInit is called.
The OEMKDIoControl function is not exposed to any application. The functionality is currently restricted to the kernel debugger.
The following code example shows OEMKDIoControl in the SHx platform code.
extern pKDIoControl;
BOOL OEMKDIoControl(
DWORD dwIoControlCode,
LPVOID lpBuf,
DWORD nBufSize,
)
switch ( dwIoControlCode ) {
case KD_IOCTL_SET_CBP:
case KD_IOCTL_CLEAR_CBP:
case KD_IOCTL_QUERY_CBP:
case KD_IOCTL_ENUM_CBP:
case KD_IOCTL_SET_DBP:
case KD_IOCTL_CLEAR_DBP:
case KD_IOCTL_QUERY_DBP:
case KD_IOCTL_ENUM_DBP:
{
PKD_BPINFO *pbp = (PKD_BPINFO)lpBuf;
}
default:
return(FALSE);
}
}
void OEMinit()
{
...
pKDIoControl = OEMKDIoControl;
}
Requirements
Header | pkfuncs.h |
Library | Nk.lib |
Windows Embedded CE | Windows CE 3.0 and later |
See Also
Reference
Optional OAL Functions
OEMInit
KD_BPINFO