This document is a list of frequently asked questions about setting up kernel debugging for Microsoft Windows 95. You'll find answers here about getting started with the System Debugger (WDEB386), but you won't find techniques for debugging your device driver.
You need a computer with a serial port, and you'll need to buy or make a null-modem cable. You only need a three-line null modem cable (transmit, receive, and ground). You don't need one with handshaking lines because WDEB386 doesn't use handshaking. You should also disable handshaking on your computer. (Handshaking allows slower receivers to keep up with the amount of data being transmitted by telling the transmitter to stop sending data until it has a chance to catch up.)
Because handshaking is disabled, it is possible that WDEB386 could send characters to the terminal faster than the terminal can display them. If you find that characters are dropped, you should increase the delay between lines (often a terminal drops characters while scrolling). Use the y CRDELAY=delay debugger command where "value" ranges from 0 (no delay) to FFFF (maximum delay). Increase the delay until your terminal stops dropping characters. You can also lower the speed of the connection. To do this, use the /c: command-line option with WDEB386 to set the baud rate.
Use the /r: command-line option with WDEB386 to change the COM port. By default, WDEB386 uses COM1 at 19200 bits per second (bps).
Typically with serial ports, you connect a computer to something like a modem. This is how serial ports are designed: you connect a computer, or Data Terminal Equipment (DTE), to a modem, or Data Communication Equipment (DCE). When you connect a computer to another computer, or DTE to DTE, you need a special cable called a null-modem cable. WDEB386 requires only the most basic null-modem cable, the three-line null-modem cable. The following illustration shows the null-modem cable's connectors. (The pin numbering would be backwards if you were looking at the computer's ports.)
The following table shows the pin numbers and names of the cable's three lines:
Pin | Name |
Pin 2 | Receive |
Pin 3 | Transmit |
Pin 5 | Ground |
Yes. The blue Laplink cable works fine. Remember to disable handshaking.
1. Using your right mouse button, click My Computer, and then click Properties.
2. In the System Properties dialog box, click the Device Manager tab.
3. In the list of device types, double-click Ports (COM & LPT).
4. Double-click the name of the port the cable is connected to, usually Communications Port (COM2).
5. In the Communications Port Properties dialog box, click the Port Settings tab.
6. In the Flow Control list, click None.
7. Click OK.
1. Install the Windows 95 Device Driver Kit (DDK).
2. At the command prompt, go to the Debug subdirectory of the directory you installed the DDK in.
3. To set up the debug environment, type the following, and then press ENTER:
ddkdebug set
This Ddkdebug batch file copies the debug VxDs to the \System\Vmm32 subdirectory of your Windows directory.
4. To restore the retail version of Windows 95, type the following, and then press ENTER:
ddkdebug restore
For more information, see Debug.txt in the Debug subdirectory of the directory you installed the DDK in.
The Ddkdebug batch file creates Runwdeb.bat in the System subdirectory of your Windows directory. Runwdeb.bat is a batch file that starts WDEB386. To use this batch file to start WDEB386, carry out the following procedure:
1. Click the Start button, and then click Shut Down.
2. In the Shut Down Windows dialog box, click the option that enables you to restart the computer in MS-DOS mode, and then click Yes.
3. At the command prompt, go to the System subdirectory of your Windows directory, type the following, and then press ENTER:
runwdeb.
If you want to change the COM port or baud rate, edit Runwdeb.bat. The /c: option determines the COM port, and the /r: option determines the baud rate.
See the Appendix for the Windows 95 DDK, either the help file or the Microsoft Word file, in the Windows System Debugger topic. <<this needs to be changed when we know where we're going to put it>>
You can use screen swapping. This requires that you set the resolution of your computer to 640 ( 480 with 16 colors and add the following line to the [386Enh] section of System.ini:
debugvga=1
To start the debugger, press the F12 key.
No, you can use only WDEB386 or a third-party debugger such as SoftIce/W for kernel debugging.
Yes, and you'll save about 90K of conventional memory. You won't, however, be able to access symbols until after the Device_Init message is sent to your VxDs. So if you use the /b option with WDEB386 to break in VMM32 initialization, the debugger will have no knowledge of symbols until Device_Init is sent.
The Ddkdebug.bat batch file creates a file called Wdebvxd.ins in the Debug subdirectory of the directory you installed the DDK in. You should insert the contents of this file into the [386Enh] section of System.ini. Make sure you comment out the following WDEB386 device lines from the [Enh386] section of System.ini when you restore the retail version of Windows 95:
Device=WDEB386.EXE Device=DEBUGCMD.VXD
For information about restoring the retail version of Windows 95, see "How do I set up WDEB386?"
To change the COM port, change the value in the debugcom= line in the [386Enh] section of System.ini. The following entry sets the COM port to COM2:
debugcom=2
To change the baud rate, change the value in the debugbaud= line. The following entry sets the baud rate to 19,200:
debugbaud=19200