windbg连接vmware或者hyper-v 的配置

来源:互联网 发布:淘宝客选什么推广 编辑:程序博客网 时间:2024/06/06 17:38
1.正确配置虚拟机和target电脑
  1.1.vmware虚拟机配置:

    VM->Settings->Hardware
      Add...->Serial Port->output to named pipe->
          \\.\pipe\[pipename] 填写[pipepath]
          This end is the server 选择
          The other end is a virtual machine 选择
          connect at power on 打钩 
             ->finish
      Serial Port [No.]->I/O mode-> 
          Yield CPU on poll 打钩
  1.2.hyper-v虚拟机配置: 
    setting->COM 1->named pipe
      填写管道名称:[pipename]
      注意自动生成的[pipepath]
  1.3.target机器设置:
    windows设备管理器->端口
      选择对应的com 设置每秒位数为115200   
    四个模块调试:bootmgr 模块、winload 模块、WinResume 模块以及 windows 内核模块Nt模块
      管理员身份batch: 
        bcdedit /set {bootmgr} bootdebug on 
        bcdedit /set {bootmgr} debugtype serial 
        bcdedit /set {bootmgr} debugport 1 
        bcdedit /set {bootmgr} baudrate 115200
        pause
      或者:
        bcdedit /debug ON
        bcdedit /dbgsettings SERIAL DEBUGPORT:1 BAUDRATE:115200
        bcdedit /enum all
        pause
2.在MSDN上下载wdk
3.在主机中配置windbg
  3.1.windbg快捷方式 属性->快捷方式->目标 

    "C:\Program Files (x86)\Windows Kits\8.0\Debuggers\x86\windbg.exe" -b -k com:port=[pipepath],baud=115200,pipe 
  3.2.windbg配置
    File->Symbol File Path
      C:\project\MySymbols;SRV*C:\project\MySymbols*http://msdl.microsoft.com/download/symbols
    注意:在reload上打勾
**windbg需要在管理员权限下启动
原创粉丝点击