Search code examples
windows-xpkernelwindbgbreakpoints

What is the earliest point in the XP boot process that I can set a breakpoint?


Just messing around with WinDbg a bit. I have a couple of virtual machines set up so I can try to do some kernel debugging on a Windows XP VM.

If I wanted to catch the system at its earliest possible moment during boot, where, or on what, would I need to set the breakpoint?


Solution

  • The earliest you can do is when KD connection is established and a first kernel module is loaded:

    Break on first module load 
    The debugger breaks into a restarted target computer after the first kernel 
    module is loaded. (This action causes the break to occur earlier than in the 
    Break on reboot state.) This command is equivalent to starting WinDbg with 
    the -d command-line option.
    

    To do that, you can either use the -d option on the command line as mentioned above, or you can press Ctrl+Alt+K in Windbg (or Ctrl+K if you use kd) to cycle through the initial breakin modes.