9Copyright 1993, NeXT Com puter, Inc. All RightsReserved.I
by Doug Mitchell
Window
[3493c]{\rtf0\ansi{\fonttbl\f1\fswiss Helvetica;}
\margl40
\margr40
\pard\tx1140\tx2300\tx3440\tx4600\tx5760\tx6900\tx8060\tx9200\tx10360\tx11520\f1\b\i0\ulnone\qc\fs24\fc0\cf0 The DDM Package
\b0 \
\ql \
\b Introduction
\b0 \
This Demo contains two binaries which are used with the driverkit's DDM facility. ("DDM" stands for Driverkit Debugging Module). The two binaries are a kernel-loadable server, which is loaded into the kernel in which your driver is running, and an App called DDMViewer. DDMViewer allows to you manipulate the IODDMMasks variables in the kernel, allowing you to selectively enable and disable individual DDM event. It also lets you examine the DDM log iteself. \
\b The DDMViewer App
\b0 \
DDMViewer enables you to look at DDM traces at user level, in a scrollview. DDMViewer also lets you specify DDM mask bits via an array of radio buttons with labels like "SCSI Disk" and "Ethernet Rx". DDMViewer can be run on any machine, not just the machine being tested. \
The App is installed in /NextDeveloper/Demos/DDMViewer.app. \
Here's a brief tutorial on using the App:\
\b Device Name
\b0 field - the name of the target to which you want to \
attach. For kernel debugging, the name is ddmServer. For user\
level drivers, the name is determined by the driver. \
\b Host
\b0
\b Name
\b0 field - the name of the host on which the target is \
running. Leave empty if the debuggee is on the current machine.\
\b List
\b0 button - start displaying DDM trace info, starting from the \
last event in time and scrolling backwards. Click again to stop.\
\b Set Mask
\b0 button - send the mask defined in the Mask window (see\
below) to the target.\
\b Disable
\b0 button - freeze the state of the DDM buffer at the target. \
Click again to re-enable.\
\b Clear Window
\b0 button - clear scrollview.\
\
\b Clear Buffer
\b0 button - clear the target's circular DDM buffer.\
\
\b Mask Window\
\b0 \
This lets you specify the value of the IODDMMasks words by name.\
The names of the mask bits are specified in an ASCII file, a \
sample of which looks like this:\
\fs20 #\
\fs24 DDMViewer
\fs20 data file for Sample Driver.\
Index : 0 : "Sample Driver"\
# Common fields.\
0x0001 : "Input packets"\
0x0002 : "Output Packets"\
\fs24 And so on. Comments start with '#'. The line which starts with \
"Index" defines which IODDMMasks word is being defined (there are \
currently 4 words of mask bits in i386 kernels, only 1 in the \
m68k kernel). The Index line also defines the name of the \
window associated with this set of mask bits. All other lines\
define one bit in the mask word, by specifying the value of the\
bit and an ASCII name which will be displayed in the Mask window. \
This information is stored in a file with extension ".ddm" and\
is accessed in DDMViewer by opening a file via the Document menu. \
\b The kernel server
\b0 \
To access DDM data in the kernel, you must load in a loadable kernel server into the kernel to be tested. A kern-loadable binary can be found in /NextDeveloper/Demos/DDMViewer.app/ddmServer_reloc.\
To load the server into the kernel, just cd to the directory containing the server, su to root, and type\
# kl_util -a ddmServer_reloc\
It takes up to a minute to load the thing; be patient. When you get a prompt back, you're ready to run DDMViewer.\