在 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项目生成输出详细信息中选择“诊断”,目的是在调试窗口中看出哪个过程编译的 ...
随机推荐
- 赤峰项目Nginx进程异常的处理办法
#强制杀掉Nginxps -ef|grep nginx|grep -v grep|awk '{print $2}'|xargs kill -9rm -rf /usr/local/openresty/n ...
- 【转】进程、线程、 GIL全局解释器锁知识点整理
转自:https://www.cnblogs.com/alex3714/articles/5230609.html 本节内容 操作系统发展史介绍 进程.与线程区别 python GIL全局解释器锁 线 ...
- python实用技巧 : Filtering os.walk(转)
''' Created on Mar 7, 2010 @author: Diego 需求: 得到某个目录下, 符合过滤条件的文件夹/文件.实现: 将os.walk再次包装. TODO: 不知道本程序的 ...
- (转帖)关于easyui中的datagrid在加载数据时候报错:无法获取属性"Length"的值,对象为null或未定义
结贴说明: 很感谢sp1234等人的热心帮忙和提醒,现在我主要说明下问题所在: 首先我在独立的js文件中,直接把测试数据loaddata进去datagrid是没有问题的.var kk = {" ...
- Codeforces Round #424 B. Keyboard Layouts(字符串,匹配,map)
#include <stdio.h> #include <string.h> ][]; ]; ]; int main(){ scanf(]); scanf(]); scanf( ...
- JavaScript防止重复提交表单
往往有些用户网络慢或者其他问题,在提交表单的时候使劲点击保存提交按钮,在提交表单的时候加上下面的代码,即可以限制在一定时间内,只有一次点击是有效的. <script> var mypret ...
- Python与数据结构[3] -> 树/Tree[2] -> AVL 平衡树和树旋转的 Python 实现
AVL 平衡树和树旋转 目录 AVL平衡二叉树 树旋转 代码实现 1 AVL平衡二叉树 AVL(Adelson-Velskii & Landis)树是一种带有平衡条件的二叉树,一棵AVL树其实 ...
- Linux命令之fdisk
fdisk fdisk [选项] <disk> 改变分区表 fdisk [选项] –l <disk> 列出所有分区表 fdisk –s <partition(分区编号 ...
- Hadoop下大矩阵乘法Version2
1)使用本方法计算F*B,其中F是1000*1000的矩阵,B是1000*20000的矩阵,使用三个节点的集群,每个节点一个CPU核(集群装在虚拟机里,宿主机只有4个CPU核),每个节点配置一个map ...
- 权限管理-RBAC
(一)RBAC 通过用户与角色关联,角色与操作的关联实现用户与操作的关联 (二)权限细分 (三)数据库设计 (四)程序设计 (五)权限与应用程序 (1)应用URL实现程序权限控制 (2)应用code实 ...