_Debug_Flags_Service

include vmm.inc

push    flags
VMMCall _Debug_Out_Service
 

Asserts various conditions. This is an asynchronous service.

flags
Specifies the debug flags. It can be a combination of the following values:
Value Meaning
DFS_NEVER_REENTER VMM has not been re-entered (see below).
DFS_TEST_REENTER VMM has not been re-entered (see below).
DFS_NOT_SWAPPING The current thread is not in the middle of a paging operation.
DFS_TEST_CLD Assert that the processor direction flag is cleared.
DFS_TEST_BLOCK Assert that NoBlock_Count is set to zero.
DFS_LOG Log this procedure (if requested).
DFS_PROFILE Increment profile count and validate the segment registers.
DFS_ENTER_NOBLOCK Increment the NoBlock_Count.
DFS_EXIT_NOBLOCK Decrement the NoBlock_Count.

The DFS_NEVER_REENTER and DFS_TEST_REENTER bits differ in their interaction with the Begin_Reentrant_Execution service. When the Begin_Reentrant_Execution service is called, the VMM re-entry count is reset to zero, even though the VMM has mostly like actually been re-entered. The DFS_TEST_REENTER bit checks this fake re-entry count, whereas the DFS_NEVER_REENTER bit checks the true re-entry count (which is unaffected by Begin_Reentrant_Execution).

The DFS_ENTER_NOBLOCK and DFS_EXIT_NOBLOCK flags increment and decrement a counter which is checked by the DFS_TEST_BLOCK bit. If the DFS_TEST_BLOCK bit is set when this internal counter is nonzero, the debugger will be notified if it is installed.

The DFS_LOG bit calls the Log_Proc_Call service on behalf of the caller.

The DFS_PROFILE bit causes the service to increment a DWORD variable generated by the BeginProc macro. Do not set this bit manually; let the BeginProc macro do it for you.

This service has no effect in the retail version of Windows. It is intended to be used with the debugging version.

As a rule, you should never call this service directly. It is generated automatically by macros in vmm.h and debug.h.

The BeginProc macro automatically calls this service with the DFS_LOG bit, as well as the DFS_TEST_REENTER if the procedure being declared is not an asynchronous service, and the DFS_TEST_BLOCK flag if the procedure is in pageable code. In the case of an exported service, the BeginProc macro also generates a DWORD profiling count and sets the DFS_PROFILE bit.

The ENTER_NOBLOCK, EXIT_NOBLOCK, and ASSERT_MIGHT_BLOCK macros in debug.h should be used to manipulate the block-related DFS bits.