Exceptions
When an application that is debugged encounters an exception in user mode, the kernel traps the exception and passes it to the (user mode) exception dispatcher.
the debugger. This seems to be the first chance exception.
If the debugger does not handle the exception, the user mode dispatcher checks for one (or more) installed vectored exception handlers (VEHs) and calls them until one handles the exception.
If none of the VEHs handled the exception, the chain of structured exception handlers is traversed until a SEH is found that handles the exception.
If none of the SEHs handles the exception, the exception is raised again
Kernel mode debugging
The two (Microsoft) debuggers that allow kernel mode debugging are
kd.exe
and
windbg.exe
.
Two computers, a target and a host, are needed for kernel mode debugging. These are connect by a
- null cable,
- IEEE 1394 cable,
- a USB 2.0/3.0 cable
- a local network or
- named pipe (if connected to a hypervisor)
TODO: is the ability to connect to the debugged computer with a local network related to the
kdnic.sys
driver?