在 XenServer上调试windows程序
2014-11-12 10:33
288 查看
WinDbg
WinDbg is one of a number of tools available from Microsoft that can be used for debugging Windows guests in XenServer environments.You can get QEMU to passive-open a TCP port on dom0 for serial output and wait for a connection, this method will work if you're running on a machine with a dynamically assigned IP address:on XenServer 6.2 or later
xe vm-param-add uuid=<uuid> param-name=platform hvm_serial=tcp::<port>,server,nodelayon earlier versions
xe vm-param-add uuid=<uuid> param-name=other-config hvm_serial=tcp::<port>,server,nodelayThen:Grab a copy of HW Virtual Serial Port from http://www.hw-group.com/products/hw_vsp/hw_vsp2_en.html and install it.
Fire up the application and configure a COM port to point at your dom0 IP address and the <port> you specified to QEMU above). Make sure that you uncheck 'NVT Enable' in the Settings tab.
Start the COM port.
Configure debugging inside the guest by editing boot.ini in the usual way.
Reboot the VM.
Start windbg and point it at the COM port you created.
An Unofficial MethodTo the best of my knowledge we have never released sockpipe.exe but this is a method some of our own developers use, it isn't supported but may be useful to developers in a debug scenario.If you're running windbg on a machine with a statically assigned IP address then you can use the following setting to get QEMU to active-open a TCP port on your machine for serial output:on XenServer 6.2 or later
xe vm-param-add uuid=<uuid> param-name=platform hvm_serial=tcp:<machine>:<port>on earlier versions
xe vm-param-add uuid=<uuid> param-name=other-config hvm_serial=tcp:<machine>:<port>Then:Run sockpipe.exe (which seems to be available here) on the machine where you want to run windbg. Run it without arguments to get help; it should be fairly obvious what's going on. For example, you could use 'sockpipe <name> <port>' (where <port> is the name number as specified to QEMU above).
Fire up windbg and go ``File->Kernel Debugging'', make sure that ``Pipe'' is ticked, and enter \\.\pipe\<name> in the Port box, where <name> is the pipe name specified to sockpipe. Hit OK.
Configure debugging inside the guest by editing boot.ini in the usual way.
Reboot the VM.
Debug as normal.
I'm told it may be a bit slow, but it mostly works although it has limitations; it will not work for SMP 64 bit or SMP Vista. Further InformationSome users have recommended this external blog detailing WinDbg in XenServer environments and in conjunction with other Citrix products, the advice contianed has not been reviewed by Citrix: http://vikashkumarroy.blogspot.ru/2012_08_01_archive.html
链接
相关文章推荐
- 在Windows下用eclipse编辑/调试Linux C/C++程序
- 无法在Web服务器上调试程序,调试失败,因为没有启动集成windows身份认证
- windows下调试linux程序
- Windows程序调试 - 调试过程
- windows7下调试ASP+ACCESS错误“未找到提供程序 该程序可能未正确安装”解决办法
- windows 程序调试 读书笔记
- Windows服务程序的调试方法
- Windows程序调试--调试版本和发布版本的区别
- Windows程序调试--Dr.Watson调试
- Windows服务程序的调试
- 在Visual Studio里调试Windows Service程序的一些心得
- 如何调试Windows外壳扩展程序(Shell Extension)
- [《网络渗透技术》学习笔记(1)]——Windows平台上一个最简单溢出程序的调试分析--漫步阳光的BLOG
- c# 调试Windows服务程序的方法
- Windows程序调试--线程堆栈
- Windows程序调试系列: 使用VC++生成调试信息
- 推荐的书:windows程序调试
- 用Windbg调试一个Windows自带扫雷程序的逻辑bug
- c# 调试Windows服务程序的方法
- Windows服务程序的调试