5.2 Starting 80386 Debugger

A three-wire null modem cable is the minimum cable requirement for the serial terminal. In a three-wire null modem cable, the TxD (transmit data) and RxD (receive data) lines are in opposite positions at the two ends of the cable, but the signal ground is connected straight through.

The command-line syntax is as follows:

wdeb386 [/C:comport] [/D:"commands"] [/F:filename] [/N] [/T:hhhh] [/S:symfile] [/V[P]] [X] winfile [parameters]

Following are the command-line options and parameters:

/C:comport

Specifies a COM port for debugger output. If this option is not specified, 80386 Debugger checks first for COM2. If COM2 is not found, the debugger then checks for COM1. If neither COM1 nor COM2 exists, the debugger checks for any other COM port in the read-only memory (ROM) data area (40:0). A three-wire null modem cable is all that is needed for terminal connection; no DTR (data-terminal-ready) and CTS (clear-to-send) handshaking is used.

/D:"commands"

Carries out the 80386 Debugger command line specified by the string enclosed in quotation marks. Spaces, semicolons (;), and other punctuation can be included in the command string. To use a single quote (') on the command line, use double quotation marks (") before and after the single quotation mark.

The commands specified in this option are carried out after symbols are loaded. This means you can set breakpoints in code even before the code has been loaded. Before a segment or module has been loaded or defined, breakpoints can be set on the logical address (a combination of map number and group number) until the segment or module is defined, at which point the breakpoint turns into a real breakpoint.

/F: filename

Specifies a file containing command-line options for 80386 Debugger. Maximum file size is 4K, and the input file cannot contain the /F option.

/N

Sets the following options:

dislwr codebytes symaddrs int3line newvec newreg newprompt

For information about these options, see the y command in Section 5.6, “Reference of 80386 Debugger Commands.”

/S: symfile

Specifies a symbol file to be loaded. This option can be repeated to load more than one symbol file. If the symbol files are not in your current directory, you must supply a full path, because 80386 Debugger does not use the PATH environment variable to locate any of the files supplied on the command line.

When memory is low, you can use more symbol files by running 80386 Debugger in the Windows directory and specifying the full path of WIN386.EXE (such as \WINDOWS\SYSTEM\WIN386.EXE) instead of WIN.COM.

/T:hhhh

Sets the port number for the timing card. (The default number is 250h.)

/V

Enables verbose mode, which displays messages indicating which segments are being being loaded. This option displays the messages for both Windows in 386 enhanced mode and Windows applications.

/VP

Enables verbose mode, which displays messages indicating which segments are being loaded. This option displays the messages for applications only.

/X

Causes symbols to be loaded into Extended Memory Specification (XMS) memory. This option has no effect with Windows version 3.1.

winfile

Specifes the Windows application to run under 80386 Debugger control. You will usually specify WIN.COM.

parameters

Specifies any parameters to be passed to the application.

Note:

The length of the command line cannot exceed 128 characters.

Following are two examples of valid commands:

wdeb386 /V /S:\windows\system\krnl286.sym /S:myapp.sym \windows\win.com /s myapp


wdeb386 /C:1 /S:krnl386.sym /s:user.sym /S:\myapp\myapp.sym \windows\win.com /3 myapp

You can start 80386 Debugger as a device driver by placing the following line in your CONFIG.SYS file:

device=c:\windev\wdeb386.exe

You must specify the full path to the WDEB386.EXE file. You can specify any command-line options on the line with device= (for example, you can load symbol files).