Diagnostics and Debugging

RDBSS provides a number of routines for diagnostic and debugging purposes. These routines fall into two categories:

  • Assert and debug routines

  • Reference and dereference tracking routines

These routines include the items in the following table.

Routine Description

RxAssert

This routine sends an assert string in checked builds of RDBSS to a kernel debugger if one is installed. When the rxAssert.h include file is used, Windows kernel RtlAssert calls will be redefined to call this RxAssert routine as well.

For retail builds, calls to this routine will bug check.

RxDbgBreakPoint

This routine raises an exception that is handled by the kernel debugger if one is installed; otherwise, it is handled by the debug system.

RxpTrackDereference

This routine is used to track a request to reference SRV_CALL, NET_ROOT, V_NET_ROOT, FOBX, FCB, and SRV_OPEN structures in checked builds. A log of these reference requests can be accessed by the logging system and WMI. This routine does not perform the dereference operation.

For retail builds, this routine does nothing.

RxpTrackReference

This routine is used to track a request to dereference SRV_CALL, NET_ROOT, V_NET_ROOT, FOBX, FCB, and SRV_OPEN structures in checked builds. A log of these dereference requests can be accessed by the logging system and WMI. This routine does not perform the reference operation.

For retail builds, this routine does nothing.

In addition to the routines listed in the previous table, a number of macros that call these routines are defined for debugging. These macros, which are listed in the following table, provide a wrapper around the RxReference or RxDereference routines used for file structure management operations on SRV_CALL, NET_ROOT, V_NET_ROOT, FOBX, FCB, and SRV_OPEN structures. These macros first call the corresponding RxpTrackReference or RxpTrackDereference routine to log diagnostic information before calling the corresponding RxReference or RxDeference routine. A log of the reference and dereference requests can be accessed by the RDBSS logging system and WMI.

Macro Description

RxDereferenceAndFinalizeNetFcb (Fcb ,RxContext, RecursiveFinalize, ForceFinalize)

This macro is used to track dereference operations on FCB structures.

Note that this macro manipulates the reference count and also returns the status of the finalize call.

RxDereferenceNetFcb (Fcb)

This macro is used to track dereference operations on FCB structures.

Note that this macro manipulates the reference count and also returns the status of the final dereference call.

RxDereferenceNetFobx (Fobx,LockHoldingState)

This macro is used to track dereference operations on FOBX structures.

RxDereferenceNetRoot (NetRoot, LockHoldingState)

This macro is used to track dereference operations on NET_ROOT structures.

RxDereferenceSrvCall (SrvCall, LockHoldingState)

This macro is used to track dereference operations on SRV_CALL structures.

RxDereferenceSrvOpen ( SrvOpen, LockHoldingState)

This macro is used to track dereference operations on SRV_OPEN structures.

RxDereferenceVNetRoot ( VNetRoot, LockHoldingState)

This macro is used to track dereference operations on NET_ROOT structures.

RxReferenceNetFcb (Fcb)

This macro is used to track reference operations on FCB structures.

RxReferenceNetFobx (Fobx)

This macro is used to track reference operations on FOBX structures.

RxReferenceNetRoot (NetRoot)

This macro is used to track reference operations on NET_ROOT structures.

RxReferenceSrvCall (SrvCall)

This macro is used to track reference operations on SRV_CALL structures that are not at DPC level.

RxReferenceSrvCallAtDpc (SrvCall)

This macro is used to track reference operations on SRV_CALL structures at DPC level.

RxReferenceSrvOpen (SrvOpen)

This macro is used to track reference operations on SRV_OPEN structures.

RxReferenceVNetRoot (VNetRoot)

This macro is used to track reference operations on V_NET_ROOT structures.