After Vista, the debug information can be output conditionally using dbuplintex or kdprintex. (The previous 2003 Server or XP is an unconditional output, which needs to be encapsulated and set the debug information level)
The information level of dbuplintex in windbg is defined as follows:
IfLevelIs equal to a number between 0 and 31, aggressive, it is
Interpreted as a bit shift. The importance bit field is set to the value
1 <Level. Thus choosing a value between 0 and 31Level
Results In a bit field with exactly one bit set. IfLevelIs 0, the bit
Field is equivalent to 0x00000001; ifLevelIs 31, the bit field is
Equivalent to zero x 80000000.
IfLevelIs a number between 32 and 0 xffffffff random Sive,
Importance bit field is set to the valueLevelItself.
Common levels include:
# Define dpfltr_error_level 0
# Define dpfltr_warning_level 1
# Define dpfltr_trace_level 2
# Define dpfltr_info_level 3
# Define dpfltr_mask 0x8000000
In windbg, You can dynamically modify the debug output level:
Kd>Ed kd_ihvvideo_mask 0x8
Set kd_xxx_mask in windbg command mode. In the above command, ihvvideo indicates setting the mask of the video driver.
Note that the specified mask also requires ored.Win2000System-wide mask (0x1 ).
How to filter debug information:
1> If the level is less than or equal to 31, judge whether (1 <level & kd_ihvvideo_mask) is 0. If not, the output is
2> If the level is greater than 31, directly determine (Level & kd_ihvvideo_mask) to determine whether to output
BTW: it does not seem to work in windbg v6.6, but this method is feasible in windbg v6.7.