virtual machine debugging

I am currently using Virtual PC and would like to handle KD (or WDEB, for
that matter) from the host box to the “target” virtual machine; at the
moment, I am forced to use a loopback cable. I think one solution might be
a fake driver on the host system emulating a couple of serial ports, but
there surely might be easier ones.

Any clue?

Federico Bianchi
Dipartimento di Storia delle Arti
Universita` degli Studi di Pisa
p.zza S.Matteo in Soarta, 2 - 56127 Pisa (Italy)
tel. +39-050-587111 (cent.), +39-050-587224 (uff.)
fax. +39-050-580128; e-mail:
===================================================
!DISCLAIMER!: my e-mail reflects my_own opinions!
===================================================

Hello,

On Thu, Nov 20, 2003 at 08:41:25AM +0100, Federico Bianchi wrote:

I am currently using Virtual PC and would like to handle KD (or WDEB, for
that matter) from the host box to the “target” virtual machine; at the
moment, I am forced to use a loopback cable. I think one solution might be
a fake driver on the host system emulating a couple of serial ports, but
there surely might be easier ones.

Set up VMWare to use a file as serial device, and put a pipe in there,
and tell Windbg to use that same pipe, too.

This way, the VMWare guest has to be startet before WinDBG, but else, it
works very good (if you don’t need real hardware on the debugee).

HTH & HAND,
Spiro.

You can do with the new Virtual PC 2004 that is now available from the
MSDN download site. You will need to change the virtual machine
settings on for the VM you want to debug so that it uses a named pipe
for COM1. Here is an overview of how I do this for VMs running
WinNT/2K/XP

Change the VM settings to use a pipe for COM1. Here is the is the
string I used in the COM1 settings dialog.

“\.\pipe\w2ksp0_com1”

Add a new line to the boot.ini file in the VM that includes options to
load the debugger at boot time.

“/debug /debugport=COM1 /baudrate=115200”

Reboot the VM and select the new boot.ini option. Then very quickly
start the debugger on the host machine using the WinDbg option to
connect to the named pipe.

“start windbg -k com:pipe,port=\.\pipe\w2ksp0_com1”

I’ve found that loading WinDbg before the VM start booting will result
in the debugger not being able to connect to the VM reliably.

A final caveat for anyone up-grading from the PDC beta version of VPC
2004 to the RTM release. If you’ve created virtual drives in a
sub-directory within the Virtual PC application directory you will
need to move the virtual drives before un-installing the beta. I
didn’t know this and the un-install deleted all of my virtual drives.

…John

On Thu, 20 Nov 2003 08:41:25 +0100 (CET), Federico Bianchi
wrote:

>
>
>
>I am currently using Virtual PC and would like to handle KD (or WDEB, for
>that matter) from the host box to the “target” virtual machine; at the
>moment, I am forced to use a loopback cable. I think one solution might be
>a fake driver on the host system emulating a couple of serial ports, but
>there surely might be easier ones.
>
>Any clue?
>
> Federico Bianchi
> Dipartimento di Storia delle Arti
> Universita` degli Studi di Pisa
> p.zza S.Matteo in Soarta, 2 - 56127 Pisa (Italy)
> tel. +39-050-587111 (cent.), +39-050-587224 (uff.)
> fax. +39-050-580128; e-mail:
> ===================================================
> !DISCLAIMER!: my e-mail reflects my_own opinions!
> ===================================================
>