Share via


Just-in-Time Kernel Debugging (Windows Embedded CE 6.0)

1/5/2010

The ability to debug crashed code, at the moment where the OS would typically terminate the relevant process, is known as just-in-time debugging. Windows Embedded CE supports just-in-time (JIT) Debugging.

This is useful when an OS developer is faced with a halted OS on a stand-alone Windows Embedded CE–based device.

If the OS has been set up for JIT debugging beforehand, the developer can respond to the system crash by connecting the target device to a development workstation running the IDE, and debug the kernel or any running application.

Exceptions are handled as follows:

  • When the OS encounters an exception, it immediately checks to see if there is a KITL debugger connection to a development workstation running the IDE.
    • If a connection exists, the kernel debugger receives the exception.
    • If no connection exists, this first-chance exception is passed back to the application that generated it. The application's exception handler is given a chance to handle this exception.
  • If the application does not handle the exception, a second-chance exception passes to the kernel debugger. This is an opportunity for JIT Debugging. After the debugger receives the second-chance exception, it checks again for a KITL connection to the host.
    • If a connection now exists, the kernel debugger takes the exception.
    • If there is still no connection, the debugger waits for a KITL connection to be made. At this point, the user can set up a KITL connection between the Windows Embedded CE–based device and the host; after this connection is made, the target device can be debugged.

In this JIT debugging scenario, the OS of the Windows Embedded CE-based device freezes and waits for a KITL connection to be made. No message is sent to signify this freeze to a user; in some situations, there might not be a user interface.

See Also

Tasks

JIT Debugging Setup

Other Resources

Kernel Debugger