B.10 Debugging a Streams Driver
The strmdbg utility provides some useful facilities for debugging STREAMS drivers. It provides services to track the allocation/deallocation of STREAMS messages and the allocation/deallocation of kernel pool memory. It also provides spin lock usage tracing and queue status information.
Note The strmdbg command only operates on a checked version of STREAMS.SYS. Supporting this tool required modifying the definitions of some of the functions exported by STREAMS.SYS. Macros in the header file debugapi.h transparently redefine the necessary functions to implement the debugging features. Thus, a free build of streams.sys and a checked version of a driver will not interoperate, and vice versa. The transport driver will fail to load if they are mixed because the loader will be unable to resolve some of the driver’s imports. The Service Controller will log an event if this situation occurs with drivers loaded under its control.
The output of the program is to the kernel debugger. The basic command is:
strmdbg