How to Set Up a Remote Debug Session Using a ModemLast reviewed: March 26, 1997Article ID: Q148954 |
The information in this article applies to:
SUMMARYThis article describes the procedures for preparing an X86 Intel-processor- based and RISC-processor-based computer running Windows NT Workstation or Server for a remote debug session.
MORE INFORMATION
What Is the Need For the Kernel DebuggerThe kernel debugger that comes with Windows NT will produce information about the system that is normally not available without the aid of the debugger. You can enable the kernel debugger from the Windows NT start-up menu. Enabling the kernel debugger will allow the Windows NT debugger to output debugging information to a remote debugger for a remote user to analyze. This is normally done at the request of a Microsoft Customer Support Engineer for analyzing a fatal error in Windows NT that cannot be diagnosed from the MEMORY.DMP file or when a MEMORY.DMP file is not produced.
What Is the Process of Remote DebuggingThe process of Remote debugging happens when two computers are connected together via modems over a phone line. The target computer and the host computer are running the Windows NT kernel debuggers which communicate using a special debug API and Protocol.
Configuring a System for Remote DebuggingConfiguring a system for remote debugging involves changing the boot options to tell Windows NT to load the kernel debugger. On an Intel x86 based platform this is done by editing the BOOT.INI file. On a RISC based system (DEC Alpha, MIPS and PPC based processors) this involves changing the boot options in the firmware menu. You will also need to have a modem and connect it to the appropriate COM port on the target computer and connect an inbound phone line to the modem.
Debugger OptionsThere are several boot options which can be used in configuring the system for debugging. These options are the same on Intel x86 and RISC platforms, although when used on a RISC platform the / is not required:
/DEBUG - When this option is used, the kernel debugger will be loaded during boot and kept in memory at all times. This means that a support engineer can dial into the system being debugged and break into the debugger, even when the system is not suspended at a Kernel STOP screen./DEBUGPORT - Specifies the serial port to be used by the kernel debugger. If no serial port is specified the debugger will default to COM2 on Intel x86 based computers and to COM1 on RISC computers./CRASHDEBUG - This option will cause the kernel debugger to be loaded during boot but swapped out to the pagefile after boot. As a result, a support engineer will not be able to break into the debugger unless Windows NT is suspended at a Kernel STOP screen. /BAUDRATE - Sets the Baud rate that the kernel debugger will use. The default baud rate is 19200. A baud of 9600 is the normal rate for remote debugging over a modem.Whenever DEBUGPORT or BAUDRATE is used, it is not necessary to use DEBUG, as Windows NT assumes that you want the computer to load in DEBUG mode. At least one of the above switches must be used to configure a computer for remote debugging, otherwise Windows NT will not load the debugger at all.
Editing the BOOT.INI file for Intel x86 ComputersTo set up the target computer on an Intel x86 based computer, simply edit the BOOT.INI file in the boot partition and add the appropriate debugger options. The BOOT.INI is edited using a standard ASCII text editor. The BOOT.INI file is a file found on the root of the system partition (generally the C drive) and will have the Hidden, System, and Read-Only attributes set. These attributes must be changed.
To Change the Attributes of the BOOT.INI FileTo change the attributes of the BOOT.INI file, follow Procedure I or II: Procedure I:
attrib +h +r +s c:\boot.ini \Procedure II:
Configuring the Boot Options in the BOOT.INITo configure a computer for debugging you must add one of the previous options to the BOOT.INI. Generally you will want to add /DEBUG and /BAUDRATE, to lower the baud rate to 9600 and put the computer in debug mode. You should use /DEBUGPORT=COMX if you cannot use the default COM port (COM2) for debugging. The following example shows how to add these options. The following is an example of a typical BOOT.INI. Each entry in the [operating systems] section should correspond to the options listed in the boot menu during a normal system startup:
[boot loader] timeout=30 default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS [operating systems] multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows NT Version 3.5" multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows NT Version 3.5" [VGA mode] /BASEVIDEO C:\="MS-DOS"To enable the debugger to use COM1 and to communicate at 9600 baud, add the following or see the example following these step-by-step instructions:
[boot loader] timeout=30 default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS [operating systems] multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows NT Version 3.5" /debug /debugport=com1 /baudrate=9600 multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows NT Version 3.5" [VGA mode] /BASEVIDEO C:\="MS-DOS" Changing Firmware Boot Options for RISC ComputersUnlike the Intel x86 computers, which use a BOOT.INI file, boot options on RISC computers are configured through the firmware. The following steps walk you through configuring the boot options on MIPS-, PPC- and DEC Alpha- based computers. Be sure to carry out step 10 for all DEC Alpha computers before a support engineer attempts to dial in and debug the system.
Preparing the ModemTo connect to the remote debugger successfully you must connect an external modem with auto-answer capabilities to the desired COM port. Most modems have this feature, but it is generally disabled. The modem should be set to 9600 baud. For a proper connection, the kernel debugger requires that hardware compression as well as error detection and flow control be turned off. Make sure the modem works correctly before proceeding any further. In most cases you will need to configure the modem by connecting to a spare COM port on the target machine or another machine, using TERMINAL.EXE or some other communication program to send configuration strings to the modem, then moving the modem to the target machine and COM port without turning off the modem. This is why an internal modem will not work, as rebooting the system will generally reset any of the changes you have made to the modem settings. To configure the modem:
NOTE: You can carry out all these steps on the target computer, using the COM port you want to configure as the debug port provided you carry them out before configuring the debugger on the target system. NOTE: Be sure you can move the modem to the target COM port without removing power from the modem.
Additional ReadingFor additional information, please see:
|
Additional query words: ntblue prodnt debugref
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |