在 XenServer上調試windows程式

來源:互聯網
上載者:User

標籤:his   rgb   ons   following   win   without   mono   call   pipe   

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
  • 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程式

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.