Hardware and Software Requirements

< BACK  NEXT >
[oR]

The terminology of the debug environment for drivers should be clear. The target machine executes the driver under test. The host machine, sometimes referred to as the development system, runs the debugger (e.g., WinDbg) and therefore controls the operation of the target. The two machines are connected together using a null-modem serial cable.

Another important but confusing term is debug client. The target machine must be booted into a special environment whereby it installs the debug client between the serial port and its operating system code. The debug client is the small block of code that allows the host debugger, via the serial port, to control the operation of the target system. The term can be confusing because the target installs and executes the debug client, yet the code makes the target a slave of the host.

For convenience, a network connection between machines is usually established. This ensures that files can be quickly exchanged providing that both machines are operational. (Never forget that while the target is paused by WinDbg, it cannot participate in network operations.)

Host System

The host system is typically used to compile and link the test driver, and it runs WinDbg as a kernel debugger. Therefore, if a choice exists, choose the machine with the more powerful set of hardware resources as the host system. The list of software that a host should contain follows:

  • Windows 2000 retail build

  • Visual C++

  • Platform SDK

  • Windows 2000 DDK

  • Symbol files for target OS build(s)

  • Driver source code

  • Driver symbol file(s)

The host does not necessarily need to execute the same OS version as the target, but it is more convenient. The host requires the symbol file for the OS version running on the target (and it cannot be networked from the target). Thus, if the host and target OS versions do not match, two versions of OS symbols may conceivably be present on the host system. With each launch of WinDbg, thought must be given to which OS symbol file set to use for the session.

Target System

The target system provides the execution environment for the test driver. It is typically configured with the following:

  • Windows 2000 retail and checked builds with debugging enabled for both

  • Driver executable (e.g., .SYS file)

  • Driver's hardware

  • Full crash dump enabled

  • Some tools from the Platform SDK (e.g., WinObj)

  • Hardware compatibility tests (HCTs) from the DDK

As explained later in this chapter, the BOOT.INI file on the target must be configured to allow selection of the appropriate Windows 2000 kernel (retail or checked). The checked version runs with considerable assertion and debug code enabled (at the cost of reduced OS performance). The extra code can produce intermediate output that is helpful for tracing some driver or driver-related bugs.

Connecting the Host and Target

To debug a driver interactively with WinDbg, the host and target must be connected using serial ports on each machine. A standard null-modem cable can be used. Since COM ports come in two flavors of connectors, DB-9 and DB-25 (both male on the computer), a dual-headed cable (Y DB-9 and DB-25 female connectors at each end) is the preferred accessory.

For the do-it-yourselfer, Table A.1 shows the necessary connections. The debug client does not use the flow control mechanisms of RS-232, but the universal jumpering scheme of DTR to DSR (Data Terminal Ready to Data Set Ready) and RTS to CTS (Request To Send to Clear To Send) is a good idea and cannot hurt. Table A.2 shows the signal assignments for the different cable connectors.

Table A.1. Null-Modem Cable Pin Assignments
Null-Modem Cable Pin Assignments
Connector A DB9 or DB25 Signal Connector B DB9 or DB25
2 Transmit to Receive 3
3 Receive to Transmit 2
7 Ground 7

Table A.2. Flow Control Jumpers for Null-Modem Cable
Flow Control Jumpers on Null-Modem Cable
DB9 DB25 Signal DB25 DB9
1 20 DTR to DSR 6 6
6 6 DSR to DTR 20 1
8 4 RTS to CTS 5 7
7 5 CTS to RTS 4 8

< BACK  NEXT >


The Windows 2000 Device Driver Book(c) A Guide for Programmers
The Windows 2000 Device Driver Book: A Guide for Programmers (2nd Edition)
ISBN: 0130204315
EAN: 2147483647
Year: 2000
Pages: 156

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net