STREAMS/UX for the HP 9000 Reference Manual

199
Debugging STREAMS/UX Modules and Drivers
Debugging Examples
instance whose q_ptr is the same as the address we have for lp. lp is a
pointer to the sp driver's private data, which is also pointed to by q_ptr. The
strdb STREAMS/UX subsystem la command will tell us what minor
numbers are in use for the sp driver:
:la sp
sp MAJOR = 115
ACTIVE Minor 2 Stream head RQ = 0x0810eb000
ACTIVE Minor 1 Stream head RQ = 0x081107a00
ACTIVE Minor 0 Stream head RQ = 0x0810ebe00
The strdb STREAMS/UX subsystem command lm will show us what
modules may have been pushed into the stream above the sp driver:
:lm sp 0
STREAM Head
lmodc
Driver sp
In this case, the panicking stream happens to correspond to the sp with
minor number 1. From the strdb STREAMS/UX subsystem, we use “:qh sp
1” to get to the read queue of the stream head containing sp driver with
minor number 1. Then the o command to get to the write queue of the stream
head. Next the n command twice to get from the stream head through the
module lmodc to the driver sp. Here is the display of the q information for
driver sp, minor number 1. Note that q_ptr is 0x24c258, which is the
address of lp.
:qh sp 1
struct queue 0x1040c74
q_qinfo = 0x1e545c q_pad1[2] = 00
q_first = 0x0q_other = 0x1040c00
q_last = 0x0
q_next = 0x0
q_link = 0x0
q_ptr = 0x24c258
q_count = 0
q_flag = 0x1128
QWANTR
QUSE
QOLD
QSYNCH
q_minpsz = 0
q_maxpsz = 256
q_hiwat = 0x8000
q_lowat = 0x4000
q_bandp = 0x105fd40