This topic has not yet been rated - Rate this topic

Attaching to a Target Computer (Kernel Mode)

Before you can begin kernel debugging with KD or WinDbg, you must specify how the connection to the target computer is to be made.

The following sections in this topic describe several ways to begin a debugging session by attaching to a target computer, organized by the location from which the session is started.

KD Command Line

To begin a kernel debugging session from the KD command line, use one of the following commands.


kd [-y SymbolPath] -k com:port=ComPort,baud=BaudRate 
kd [-y SymbolPath] -k 1394:channel=1394Channel[,symlink=1394Protocol] 
kd [-y SymbolPath] -k usb2:targetname=String 
kd [-y SymbolPath] -k com:modem 
kd [-y SymbolPath] -kl 
kd [-y SymbolPath] 

If you do not include the -k command-line option, the connection settings are based on the values of certain environment variables. For more information about the kernel connection options and the restrictions on their use, see Choosing Kernel Debugging Settings. For more information about other options, see KD Command-Line Options.

You can change the kernel debugging baud rate after the session has begun by using CTRL+A.

WinDbg Command Line

To begin a kernel debugging session from the WinDbg command line, use one of the following commands.


windbg [-y SymbolPath] -k com:port=ComPort,baud=BaudRate 
windbg [-y SymbolPath] -k 1394:channel=1394Channel[,symlink=1394Protocol] 
windbg [-y SymbolPath] -k usb2:targetname=String 
windbg [-y SymbolPath] -k com:modem 
windbg [-y SymbolPath] -kl 
windbg [-y SymbolPath] -k 

If you do not include the -k command-line option, the connection settings are based on the values of certain environment variables. For more information about the kernel connection options and the restrictions on their use, see Choosing Kernel Debugging Settings. For more information about other options, see WinDbg Command-Line Options.

You can change the kernel debugging baud rate after the session has begun by clicking the Debug | Kernel Connection | Cycle Baud Rate command or pressing CTRL+ALT+A.

WinDbg Menu

When WinDbg is in dormant mode, you can begin a kernel debugging session by clicking Kernel Debug on the File menu or by pressing CTRL+K.

When the Kernel Debugging dialog box appears, click the COM tab, the 1394 tab, or the Local tab. Each tab specifies a different connection method. For more information about the dialog box and its entries, see File | Kernel Debug.

If you leave the boxes in the Kernel Debugging dialog box blank, the connection settings are based on the values of certain environment variables. For more information about these settings, see Choosing Kernel Debugging Settings.

Beginning the Session

After the debugger on the host side has started and is waiting to connect, start the target computer. If the target computer is debugger-enabled (as described in Boot Parameters to Enable Debugging), the target computer's debugger will connect automatically, early in the startup process.

If the target computer has stopped responding, the target computer is still stopped because of an earlier kernel debugging action, or you used the -b command-line option, the debugger breaks into the target computer immediately.

Otherwise, the target computer continues running until the debugger orders it to break.

For more information about the next steps, see Debugger Configuration, Symbols, Debugger Operation (General) and Debugger Operation (Kernel Mode).

1394 Configuration

When you first start the kernel debugger after enabling debugging over a 1394 connection, a driver is installed on your host computer. You must be logged on as an Administrator on the host computer during this debugging session. For more information about this driver, see Installing the 1394 Virtual Driver.

You must also configure the target computer for kernel debugging over a 1394 cable. For more information about this configuration, see Disabling the 1394 Host Controller.

 

 

Send comments about this topic to Microsoft

Build date: 12/1/2010

Did you find this helpful?
(1500 characters remaining)