Dump Analysis of Loops in Ring 0 Code

Ring zero loops can sometimes be successfully analysed from a dump. The trick is knowing how to locate the register set at the time the dump was taken.

The Dump Formatter only implements the .R command, which obtains the registers from a stack frame on the thread's ring 0 stack. Under the kernel Debugger there is no problem: the R command will display the current system registers.

Note:

If a thread never runs in User Mode, such as the internal PID 0 threads then a stack frame is never built and .R will be unsuccessful in formatting the registers.