STREAMS/UX for the HP 9000 Reference Manual
200
Debugging STREAMS/UX Modules and Drivers
Debugging Examples
q_nband = 1
q_pad1[0] = 00
q_pad1[1] = 00
Now that we have reached the queue structure for the panicking sp driver
instance, we can use strdb or adb to examine its contents. Using the strdb
command :b, we can look at q_ptr, and see that its mp field (the third word)
is NULL:
At this point, we have probably learned all that we can from the dump and
must turn to the source code to discover the cause of this problem. We next
examine the code carefully everywhere that lp->mp is updated or should be
updated. Because sp driver's put routine, spput(), should be updating
lp->mp, we look at it first.
static spput(q, mp)
queue_t *q;
mblk_t *mp;
{
struct sp *lp;
unsigned int s;
switch (mp->b_datap->db_type) {
case M_DATA:
case M_PROTO:
case M_PCPROTO:
s = splstr();
lp = q->q_ptr;
if (!lp->last_mp)
lp->last_mp = mp;
else
lp->last_mp->b_next = mp;
splx(s);
:b 0x24c258
0x0024c258 00 00 00 01 01 04 0c 00 00 00 00 00 01 0f 7c 00 | ................
0x0024c268 00 00 00 01 01 0f 8e 00 00 00 00 00 00 00 00 00 | ................
0x0024c278 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
0x0024c288 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
0x0024c298 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
0x0024c2a8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
0x0024c2b8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
0x0024c2c8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
0x0024c2d8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
0x0024c2e8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
0x0024c2f8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
0x0024c308 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
0x0024c318 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
0x0024c328 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
0x0024c338 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................