To do this exercise, you need to connect 2 machines by serial
cable, so , prepare 2 computers with serial ports. You can borrow
a serial cable from Hiraki Lab. And OS should be Windows XP SP1
or later.
Install Windows DDK(Device Driver Kit).You can install this
from CD-R which are delivered in the lecture.
You need to use debugger.You can download from "Microsoft
Debugger Page". Debugger will be installed in "C:\Program
Files\Debugging Tools for Windows\" by default, so , you'd
better add this directry into PATH environment variable.
Decide rolls of two machines.One is debug target machine (denote "target
machine") and the other is debug operation machine(denote "debug
machine"). target machine should be run in debug mode, so , add
an entry in "C:\boot.ini" as follows.
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="WinXP Kernel Debug Mode" /fastdetect /debug /debugport=COM1 /baudrate=9600
|
/debugport specifies debugging port (COM1
port) and /baudrate specifies the speed of serial communication.
/baudrate should be identical to the rate which is used in Windows
COM1 driver. You can look this rate in device manager.
In debug machine (assumes PATH is correctly adjusted), you can
debug by using kd or windbg via serial port. Below statement
is an example of kd. This specifies a port and baudrate to kd.
kd -k com:port="com1",baud=9600
|
If you want to know more about debugger,
see help ("debugger.chm"). This help is installed with debugger
program.
The sample file, used in this exercise, is in src\general\cancel
(under WINDDK directry). If you didn't install this sample, you
can install from the CD-R. Detail information about the sample "cancel" is
in "cancel.htm".This file is in "cancel" directry. |