Visual Studio 2015 wdk没有打破驱动程序调试

时间:2017-03-09 20:49:16

标签: debugging visual-studio-2015 windbg wdk

我已使用QEMU设置了主机和目标Windows 8.1虚拟机。当我启动目标时,我能够在主机上看到windbg上的日志。在visual studio 2015中,当我附加进程并选择windows内核模式调试器时,我能够打破并查看日志。但是,当我尝试安装驱动程序时,调试器不会中断。

以下是我的工作:

  1. 将环境变量_NT_SYBMBOL_PATH设置为 C:\符号\驱动器; SRV * C:\符号\ websymbols * HTTP://msdl.microsoft.com/download/symbols
  2. 编译驱动程序
  3. 使用symstore add /f c:\users\admin\qc-driver\x64\Debug /s c:\symbols\driver /r
  4. 生成pdb文件
  5. 将Debug文件夹复制到目标计算机
  6. 使用attach to process and break
  7. 启动内核模式调试器
  8. 按“继续”或键入g以使调试程序继续
  9. 切换到目标计算机并在命令行上使用pnputil -f -a qcu-driver.inf
  10. 驱动程序安装,但调试器不会在我在DriverEntry上设置的断点处停止。我使用了lm,即使安装后也没有加载驱动程序。我在运行.reload /f driver.sys后尝试!sym noisy,我收到此错误:

    0: kd> !sym noisy
    noisy mode - symbol prompts off
    0: kd> .reload /f qcu-driver
    
    Press ctrl-c (cdb, kd, ntsd) or ctrl-break (windbg) to abort symbol loads that take too long.
    Run !sym noisy before .reload to track down problems loading symbols.
    
    "qcu-driver" was not found in the image list.
    Debugger will attempt to load "qcu-driver" at given base 00000000`00000000.
    Please provide the full image name, including the extension (i.e. kernel32.dll)
    for more reliable results.Base address and size overrides can be given as
    .reload <image.ext>=<base>,<size>.
    DBGENG: qcu-driver - Partial symbol image load missing image info
    DBGHELP: No header for qcu-driver. Searching for dbg file
    DBGHELP: .\qcu-driver.dbg - file not found
    DBGHELP: qcu-driver missing debug info. Searching for pdb anyway
    DBGHELP: qcu-driver.pdb - file not found
    DBGHELP: Can't use symbol server for qcu-driver.pdb - no header information available
    DBGHELP: Can't use symbol server for qcu-driver.pdb - no header information available
    DBGHELP: Can't use symbol server for qcu-driver.pdb - no header information available
    DBGHELP: qcu_driver - no symbols loaded
    Unable to add module at 00000000`00000000
    

    有人可以说清楚,我是内核调试的新手。

0 个答案:

没有答案