zz from: http://cache.baiducontent.com/c?m=9f65cb4a8c8507ed4fece7631046893b4c4380146d96864968d4e414c42246191c3aabe1607f48438fd82f2747f41802bded602571507be9dad5824ad7b0922a249c6269304a8904498f4fff9e5124b137e15cfed96af0ca8325e2dec5d2af4323cd44717f9781f84d7612dd6f81506aa3e0de1b4b4811cabd6d2f&p=9c78e715d9c342a91ebe9b7c5457c4&newp=84759a45d5c51bc309be9b7c55448c231610db2151d4d601298ffe0cc4241a1a1a3aecbf2126140ed1c17f6103ac4c5be1f23c78330434f1f689df08d2ecce7e75e476&user=baidu&fm=sc&query=windbg%C4%DA%BA%CB%B5%F7%CA%D4+virtualbox&qid=a8674e3700044485&p1=3
环境:
Host:: Win 8
Guest:Win 8
VirtualBox:装有Guest系统
步骤:
1. 起VirtualBox,进guest,用管理员起命令行,运行:
> bcdedit /dbgsettings serial debugport:2
> bcdedit /debug ON
(*bcdedit ref: http://msdn.microsoft.com/en-us/library/windows/hardware/ff542187%28v=vs.85%29.aspx)
> bcdedit /dbgsettings
查看设置情况:
2. 关guest,在virtualbox 中Machine->Settings->Serial Ports中作如下设置:
3. 开Windbg,File->Kernel Debug,设置:
设置完成后Windbg等待连接。另外需要的话可以设置Symbol路径(File->Symbol file Path中加SRV*C:\symbols*http://msdl.microsof.com/download/symbols),这不是必需的,设完后在Windbg中可看到Kernel的symbol。
4. 起guest系统,启动时windbg自动连接:
相关文章:
http://angarciar.wordpress.com/2011/07/29/kernel-debugging-with-windbg-virtualbox-via-serial-port/
http://www.codeproject.com/Articles/130016/Setting-Up-Kernel-Mode-Debugger-in-Windows
http://www.personal.psu.edu/jdl5225/blogs/eportfolio/Instruction_Set.pdf