使用DebugView打印内核调试信息是开发驱动的非常重要的手段,但DebugView在VISTA/WINDOWS 7下却无法获取内核的调试日志,修改方法是:

HKLM/SYSTEM/CurrentControlSet/Control/Session Manager,打开或者创建子项Debug Print Filter,然后新建一个DWORD值DEFAULT,将其设置成0xF,重启即可。如果写成可导入的REG文件:

    Windows Registry Editor Version 5.00 

    [HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Session Manager/Debug Print Filter] 
    "DEFAULT"=dword:0000000f

The problem: Your DbgPrint or KdPrint messages don't appear in WinDbg (or KD) when you run your driver on Windows Vista.

The reason?  Vista automatically maps DbgPrint and friends to DbgPrintEx.  Now, you may recall that DbgPrintEx allows you to control the conditions under which messages will be sent to the kernel debugger by filtering messages via a component name and level in the function call and an associated filter mask in either the registry or in memory.

In Vista, DbgPrint and KdPrint are mapped to component "DPFLTR_DEFAULT_ID" and level "DPFLTR_INFO_LEVEL".  Of course, in Vista, xxx_INFO_LEVEL output is disabled by default.  So, by default, your DbgPrint/KdPrint doesn't get sent to the kernel debugger.

How to fix it? Two choices:

  • Enable output of DbgPrint/KdPrint messages by default --Open the key "HKLM/SYSTEM/CCS/Control/Session Manager/Debug Print Filter".  Under this key, create a  value with the name "DEFAULT"  Set the value of this key equal to the DWORD value 8 to enable xxx_INFO_LEVEL output as well as xxx_ERROR_LEVEL output.  Or try setting the mask to 0xF so you get all output.  You must reboot for these changes to take effect.

  • Specifically change the component filter mast for DPFLTR.  In early releases of Vista/LH you changed the default printout mask by specifying a mask value for the DWORD at Kd_DPFLTR_MASK ("ed Kd_DPFLTR_MASK").  In build 5308 (the February CTP of Vista), it seems that the mask variable has changed and you need to set the mask value for the DWORD at Kd_DEFAULT_MASK ("ed Kd_DEFAULT_MASK).  In either case, specify 8 to enable DPFLTR_INFO_LEVEL output in addition to DPFLTR_ERROR_LEVEL output, or 0xF to get all levels of output.

See the WDK documentation for Reading and Filtering Debugging Messages (follow the path: Driver Development Tools/Tools for Debugging Drivers/Using Debugging Code in a Driver/Debugging Code Overview) for the complete details on the use of DbgPrintEx/KdPrintEx.  Or look at the Debugging Tools For Windows documentation (Appendix A) on DbgPrintEx.

If your interested in setting the registry keys to enable output, then check out the SetDbgPrintFiltering utility at http://www.osronline.com/downloads.

http://www.osronline.com/article.cfm?id=295

转载于:https://blog.51cto.com/zer0day/1626338

Win7 32位下DebugView和DriverMinitor不能打印调试信息的问题相关推荐

  1. win7 32位装mysql_2017-11-16 Win7 32位下安装Mysql

    上https://www.mysql.com/downloads/ ,下载免安装,32位版本,mysql-5.7.20-win32.zip.解压放在d:\mysql目录下.该目录下新建data目录. ...

  2. win7 32位下实现远程线程注入

    dllmain.cpp 生成注入的dll // dllmain.cpp : 定义 DLL 应用程序的入口点. #include "stdafx.h" #include <Wi ...

  3. 外网win10 64位环境下 为内网win7 32位安装三方包的最靠谱手段:python64位、32位全安装。...

    经过一周的各种折磨,如题.以下是我的经验和教训. 我的外网是win10 64位,内网环境win7 32位.由于未知原因,anaconda无法安装!!! 其实最靠谱的安装三方包的还是whl包.但是很有可 ...

  4. 64位mysql 和32位区别_navicat for mysql 64位和32位区别,win7 64位下用32位和64位有区别吗??...

    展开全部 一.win7 32位和64位的区别 先说说硬件配置上的区别.选择64位Windows 7的网友中很有大比例是内存大于或等于4GB.在62616964757a686964616fe58685e ...

  5. win7装xp双系统_UEFI新PC装Win7 32位系统:巧用”硬盘保护卡“解决

    免责声明:本文只是从技术角度进行讨论,主要因我自己的兴趣而引发测试.只代表个人观点,与任何组织机构无关. 在春节期间发表了<为了这个"完美"版Win7镜像,我用了一年的时间& ...

  6. win7 32位系统搭建iphone开发环境

    本文转自http://bbs.weiphone.com/read.php?tid=2173406,由于担心以后再用到的时候找不到,所以自己保存一份.也让有需要的朋友能够找到非常不错的资源. 教程我就简 ...

  7. html chm 64,Win7 64位下的CHM

    最近下了几个沪江资料,都是chm格式的,但是在win7 64位下,都显示不了里面的音频和视频flash之类的控件,虽然可以通过源文件的方式打开视频文件,但是很麻烦. 网上似乎碰到的人也不是很多,基本就 ...

  8. win7 64位下如何安装配置mysql-5.7.17-winx64

    本人综合了两篇文章得以安装成功: win7 64位下如何安装配置mysql-5.7.4-m14-winx64 the MySQL service on local computer started a ...

  9. win7计算机服务启动不了,win7 32位旗舰版提示依赖服务无法启动怎么修复

    win7 32位旗舰版系统用户最近遇上了一个问题计算机无法上网并提示依赖服务组无法启动,出现这种故障是怎么回事?win7 32位旗舰版提示依赖服务无法启动怎么修复?且看以下教程. 具体的解决方法: 有 ...

最新文章

  1. 28.构造函数中,成员变量一定要通过初始化列表来初始化的?
  2. oracle创建dblink语句_一文看懂Oracle12c中多租户(容器)从种子创建PDB
  3. java输入日期计算天数_(JAVA)输入年月日,计算日期是今年的第几天?
  4. Rust 中的继承与代码复用
  5. python bootstrap安装_python + django + bootstrap + uWSGI + nginx 环境搭建
  6. AJPFX解析关于编码ansi、GB2312、unicode与utf-8的区别
  7. Spring AOP面向切面源码解析
  8. D3之svg transform 与 css3 transform 区别与联系
  9. cmd命令配置MySQL
  10. iostate知识要点
  11. 【最全】微信支付宝小程序蓝牙API开锁全流程
  12. 乐高spike python_SPIKE Prime科创套装 篇四:乐高教育SPIKE Prime入门编程和搭建活动教学...
  13. matlab 生成格雷码,格雷码(Grey Code)生成规则
  14. 规范JavaScript注释
  15. 用excel数据批量填充word表格
  16. 美国金融危机产生的原因
  17. three.js入门到实战
  18. 苹果客户端支付后,服务器端对数据进行二次验证接口开发
  19. 算法-九九乘阶打印和计算N的乘阶结果
  20. 解密微信小程序加密的微信运动数据(java)

热门文章

  1. 何时才使用https访问项目
  2. GitHub Desktop离线安装包
  3. MongoDB学习笔记二—Shell操作
  4. 同样版本的jstl,都是jstl1.2版本,有个有问题,另一个没有问题
  5. Android开发环境搭建Eclipse+JDK+ADT+AVD(系列一)
  6. 收到朋友寄来的煎饼了
  7. 网站流量和金钱的关系
  8. Python学习笔记之While循环(一)
  9. rdd转换成java数据结构_Spark RDD转换成其他数据结构
  10. python 服务器框架_python 服务器框架