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:

  1. Grab a copy of HW Virtual Serial Port from http://www.hw-group.com/products/hw_vsp/hw_vsp2_en.html and install it.
  2. 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.
  3. Start the COM port.
  4. Configure debugging inside the guest by editing boot.ini in the usual way.
  5. Reboot the VM.
  6. 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:

  1. 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).
  2. 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.
  3. Configure debugging inside the guest by editing boot.ini in the usual way.
  4. Reboot the VM.
  5. 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

链接

在 XenServer上调试windows程序的更多相关文章

  1. ubantu上编辑windows程序

    命令简记 cd $GOROOT/src cp -r $GOROOT /root/go1.4 CGO_ENABLED=0 GOOS=windows GOARCH=amd64 ./make.bash 操作 ...

  2. php异步调试和线上调试网站程序的方法

    当碰到一个网站需要不间断运行,但又需要调试该网站的程序错误的时候,该如何办呢?是靠经验一点点猜测,还是直接打印错误信息让其在页面输出? 下面分享一种方法同时满足这两种条件,既方便网站程序错误调试,又不 ...

  3. [WINCE|VS2008] 用在PC上调试WINCE程序

    http://www.danielmoth.com/Blog/deploy-to-my-computer.aspx 作者:The Moth 步骤: 1. 在VS2008中打到 Device Optio ...

  4. 在xcode 上调试c程序

    打开xcode 选择 Create a new Xcode project 选择Command Line Tool 给你的项目起个名,选择c语言 点击next 选择存储位置,就会制动生成一个项目,在项 ...

  5. Linux上调试python程序

    python -m pdb target.py

  6. Android如何运行真机在eclipse上调试应用?

    主要通过以下几个步骤: 1.手机通过数据线连接在电脑上 2.设置android手机为USB调试模式.步骤: menu—> 设置 —> 应用程序 —> 开发 , 选择[USB调试] 3 ...

  7. .net Windows服务程序和安装程序制作图解 及 VS 2010创建、安装、调试 windows服务(windows service)

    .net Windows服务程序和安装程序制作 最近项目中用到window服务程序,以前没接触过,比较陌生,花了两天的时间学习了下,写了个简单的服务,但在制作安装程序的时候,参照网上很多资料,却都制作 ...

  8. windows程序员进阶系列:《软件调试》之堆 (一)

    windows程序员进阶系列:<软件调试>之堆 (一) 堆是软件在运行时动态申请内存空间的主要途径.从堆上申请来的空间需要程序员自己申请和释放,且申请和释放操作必须绝对匹配.忘记释放或者多 ...

  9. vs调试windows mobile程序时布署时间太长的解决办法

    vs调试windows mobile程序时布署时间太长的解决办法 1.VS平台上,选工具-选项-项目和解决方案-MS BUILD项目生成输出详细信息中选择“诊断”,目的是在调试窗口中看出哪个过程编译的 ...

随机推荐

  1. 【C++】默认构造函数

    参考文献: 1.黄邦勇帅 2.http://www.cnblogs.com/graphics/archive/2012/10/02/2710340.html 3.http://blog.csdn.ne ...

  2. Ansi,UTF8,Unicode,ASCII编码的区别 ---我看完了 明白了很多

    来自:http://blog.csdn.net/xiongxiao/article/details/3741731 ------------------------------------------ ...

  3. Django-ContentType

    背景:学位课.专题课.价格策略(每一种课程(学位课和专题课下可分为不同的种类的课程)在不同学习时间内的价格不同) 例如:如何将课程表与价格策略表关联起来: 用外键是可以将课程表和价格策略表关联起来的, ...

  4. Java多态机制和继承中重写重载

    关于Java中多态机制 http://www.cnblogs.com/chenssy/p/3372798.html 这篇博文讲的很透彻 大体意思是 多态定义: 多态就是指程序中定义的引用变量所指向的具 ...

  5. tomcat并发优化

    配置参考 <Connector port="9027" protocol="HTTP/1.1" maxHttpHeaderSize="8192& ...

  6. Django+ openpyxl 导出文件,设置表头/内容格式

    之前使用xlrd.xlrt处理文件的导入导出,这两个主要用于excel2003格式的文件的读写,并且xlrt最多可以写入256行,大于256行会报错 找了新插件openpyxl,对它找到针对某一行设置 ...

  7. thinkphp函数学习(1)——header, get_magic_quotes_gpc, array_map, stripslashes, stripslashes_deep

    1. header 相关语句 header('Content-type: text/html; charset=utf-8'); // 因为这是在TP的入口文件中,所以每个页面返回的http head ...

  8. Express处理GET/POST请求(POST请求包含文件)

    Express处理GET/POST请求(POST请求包含文件) GET 使用简洁的pug模板引擎,写一个表单,提交方法是GET 前端页面代码 enctype,默认是application/x-www- ...

  9. HDOJ 4903 The only survival

    Discription: There is an old country and the king fell in love with a devil. The devil always ask th ...

  10. MySQL json 类型操作快速入门

    MySQL 5.7.8开始支持 json类型. create table t(id int,js json,PRIMARY KEY (`id`)) 插入数据insert into t values(1 ...