4.1.4 Enabling Kernel Debugging on the Target
The following information is for enabling the debugging component on the target machine so that the host debugger can communicate with the target. For information on starting the host debugger, see Section 4.1.6.
You must enable kernel debugging on the target machine before you can connect to it with WinDbg.
The method of enabling kernel debugging on the target machine is different for the different platforms supported by Windows NT. For an ARC machine (RISC-based platforms), you modify the OSLOADOPTIONS environment variable in the ARC firmware; for an x86-based machine, you modify a line in the [operating systems] section of boot.ini.
In the appropriate section for the target platform as outlined in the preceeding section, you can specify the following options:
DEBUG
Enables kernel debugging.
NODEBUG
Disables kernel debugging. If no options are specified, NODEBUG is implied. NODEBUG disables DEBUGPORT, BAUDRATE, and CRASHDEBUG.
DEBUGPORT=Port
Specifies the serial port (Port is COM1, COM2, and so forth.) used on the target machine. This parameter is the functional equivalent of DEBUG with the additional ability to override the default debug COM port. The default port without using DEBUGPORT is COM2, if it exists, on an x86 machine; in all other cases the default is COM1.
BAUDRATE=BaudRate
Specifies the baud rate (BaudRate is 9600, 19200, etc.) used by the target machine. Use the highest rate that works for your machines.
Specifing BAUDRATE enables kernel debugging and renders DEBUG redundant.
CRASHDEBUG
Causes the debugger to activate only when the system bugchecks.
MAXMEM=SizeInMB
Specifies the amount of RAM to be made available to the system in megabytes. This option can be used to simulate a system with a low amount of physical memory to test the performance and operation of a driver under those conditions. For example, you can restrict a 16 MB machine to 10 MB.
SOS
Causes the OS loader to display the names of the drivers as they load when Windows NT is booting.
For an RISC based machine, the following OSLOADOPTIONS would boot Windows NT in a simulated 10 MB environment, with kernel debugging enabled on COM1, and communicating at 115200 baud.
OSLOADOPTIONS= MAXMEM=10 DEBUGPORT=COM1 BAUDRATE=115200
The following is an equivalent entry, for an Intel x86 platform, in boot.ini.
multi(0)disk(0)rdisk(0)partition(1)\NT="Windows NT" /MAXMEM=10 /DEBUGPORT=COM1 /BAUDRATE=115200