在 XenServer上调试windows程序
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,nodelay
on earlier versions
xe vm-param-add uuid=<uuid> param-name=other-config hvm_serial=tcp::<port>,server,nodelay
Then:
- 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 Method
To 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 Information
- Some 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
在 XenServer上调试windows程序的更多相关文章
- ubantu上编辑windows程序
命令简记 cd $GOROOT/src cp -r $GOROOT /root/go1.4 CGO_ENABLED=0 GOOS=windows GOARCH=amd64 ./make.bash 操作 ...
- php异步调试和线上调试网站程序的方法
当碰到一个网站需要不间断运行,但又需要调试该网站的程序错误的时候,该如何办呢?是靠经验一点点猜测,还是直接打印错误信息让其在页面输出? 下面分享一种方法同时满足这两种条件,既方便网站程序错误调试,又不 ...
- [WINCE|VS2008] 用在PC上调试WINCE程序
http://www.danielmoth.com/Blog/deploy-to-my-computer.aspx 作者:The Moth 步骤: 1. 在VS2008中打到 Device Optio ...
- 在xcode 上调试c程序
打开xcode 选择 Create a new Xcode project 选择Command Line Tool 给你的项目起个名,选择c语言 点击next 选择存储位置,就会制动生成一个项目,在项 ...
- Linux上调试python程序
python -m pdb target.py
- Android如何运行真机在eclipse上调试应用?
主要通过以下几个步骤: 1.手机通过数据线连接在电脑上 2.设置android手机为USB调试模式.步骤: menu—> 设置 —> 应用程序 —> 开发 , 选择[USB调试] 3 ...
- .net Windows服务程序和安装程序制作图解 及 VS 2010创建、安装、调试 windows服务(windows service)
.net Windows服务程序和安装程序制作 最近项目中用到window服务程序,以前没接触过,比较陌生,花了两天的时间学习了下,写了个简单的服务,但在制作安装程序的时候,参照网上很多资料,却都制作 ...
- windows程序员进阶系列:《软件调试》之堆 (一)
windows程序员进阶系列:<软件调试>之堆 (一) 堆是软件在运行时动态申请内存空间的主要途径.从堆上申请来的空间需要程序员自己申请和释放,且申请和释放操作必须绝对匹配.忘记释放或者多 ...
- vs调试windows mobile程序时布署时间太长的解决办法
vs调试windows mobile程序时布署时间太长的解决办法 1.VS平台上,选工具-选项-项目和解决方案-MS BUILD项目生成输出详细信息中选择“诊断”,目的是在调试窗口中看出哪个过程编译的 ...
随机推荐
- Cannot open include file: 'libxml/xpath.h': No such file or directory
在搭建scrapy爬虫框架时,通过pip安装lxml遇到了这个问题,我是用32位的windows搭建爬虫框架,python版本是2.7.12, 解决方案如下: 原因: 在网上各种找原因,有大神是说没安 ...
- #!bin/sh是啥
第一句的#!是对脚本的解释器程序路径,脚本的内容是由解释器解释的,我们可以用各种各样的解释器来写对应的脚本,比如说/bin/csh脚本,/bin/perl脚本,/bin/awk脚本,/bin/sed脚 ...
- centos7.2使用yum安装MariaDB10.1
①添加MariaDB的yum源 1.创建MariaDB.repo sudo vi /etc/yum.repos.d/Mariadb.repo 2.将以下文件中的字段添加到MariaDB.repo文件中 ...
- eclispe新导入的文件有个小红叉号(x)的问题
关于这个问题,我百度了很久,后面发现很简单的就解决了:我觉得可能大家的问题不一样,或许解决方法可能是一样的: 参考链接:https://zhidao.baidu.com/question/616762 ...
- HDU 5938 Four Operations 【字符串处理,枚举,把数字字符串变为数值】
Problem Description Little Ruins is a studious boy, recently he learned the four operations! Now he ...
- 差分+树状数组【p4868】Preprefix sum
Description 前缀和(prefix sum)\(S_i=\sum_{k=1}^i a_i\). 前前缀和(preprefix sum) 则把\(S_i\)作为原序列再进行前缀和.记再次求得前 ...
- Tarjan缩点【p1262】间谍网络
Description 由于外国间谍的大量渗入,国家安全正处于高度的危机之中.如果A间谍手中掌握着关于B间谍的犯罪证据,则称A可以揭发B.有些间谍收受贿赂,只要给他们一定数量的美元,他们就愿意交出手中 ...
- 22、Django实战第22天:课程评论
1.编辑course-comment.html 2.编辑courses.views.py class CourseCommentView(LoginRequiredMixin, View): def ...
- 显示(explicit )与隐式(implicit)转换操作符
class Program { static void Main(string[] args) { /* * 不管是显示还是隐式转换,一种类型都只能出现一次 */ Console.WriteLine( ...
- Difference between [0-9], [[:digit:]] and \d
Yes, it is [[:digit:]] ~ [0-9] ~ \d (where ~ means aproximate).In most programming languages (where ...