Add conditional break to debug GINA

When remote debugging a Widnows GINA it is handy to stuff in a debug break so that the debugger can be attached and symbols loaded. When you need to replace the GINA dll or view log files stored on the system you must boot to safe mode, remove the WinLogon registry entry, and reboot. With this little code snippet (in C++) you can decide at runtime when you want to hard break by simply holding down the left shift key and eliminate the extra annoying reboots:

if ( (GetAsyncKeyState(VK_LSHIFT) & 0x8000) ) {
  _asm int 3; // break if left shift held down
}
Be Sociable, Share!
You can leave a response, or trackback from your own site.

Leave a Reply