Boring notes

DbgPrint and suddenly found no output in windbg, the vaguely remember the day my brother said Tang Peng ed Kd_Default_Mask 8 can output the drive 1. write today. Just remember that before this command to get away, but today suddenly want to know why you wrote. Smooth in winddbg help documentation to find the appropriate information.

                    

  We DbgPrintEx original parameter or the first time a selection output is KdPrintEx corresponding ComponentId, the second parameter is a Level. We can modify the windbg Kd_ (ComponentId) _Mask value (this value is referred widnbg importance bit field) to determine whether the corresponding message is output.

 

  Level is above some value defined in the document windbg wrote: when 0 <= Level <= 31, Level is considered shift bit, i.e. Importance Level = Field <<. 1 'bit . When 32 <= Level <when 0xFFFFFFFF =, Importance Level = Field 'bit . When we set the conversion Level KdPrintEx DbgPrintEx or in the corresponding importance bit field is provided in our WinDbg _mask Kd_ (ComponentId) is not 0 after the value and calculation, then the message is output.

  

  

  在windbg文档中发现在windows vista之后DbgPrint和KdPrint的Componetid为DEFAULT,Level被设置为DPFLTR_INFO_LEVEL(即importance bit field = 3<<1 = 0x8),但我们在windbg查看Kd_Default_Mask时发现为0x1,这就是为什么我们DbgPrint消息被过滤的原因。因此我们只要将Kd_Default_Mask and 0x8 = 0x1即可输出(因此0x8,0xA,0x18,0xfffffff等等都可以输出)。

  --------------更多详细的资料请阅读windbg文档“Reading and Filtering Debugging Messages”

 

Guess you like

Origin www.cnblogs.com/DreamoneOnly/p/11392041.html