Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

map port number of VM to named pipe

I'm currently looking into kernel driver development and have set up a Win7 Virtual Machine in VMware Workstation (Vmware academic program is great :)) and now I want to connect the Visual Studio Debugger to the VM via a virtual Serial Port Named Pipe.

The instructions on MSDN: http://msdn.microsoft.com/en-us/library/windows/hardware/jj200334%28v=vs.85%29.aspx

right that seems pretty easy! I have created a virtual serial port on my VM named \.\pipe\kerneldebug and configured it properly. However this named pipe has no link to any COM port, i.e. 1-5, so what do I put in for n in: bcdedit /dbgsettings serial debugport: n baudrate: 115200

I couldn't find a way to map the named pipe to the port as required in the MSDN instructions.

Any help would be much appreciated!

Regards

like image 935
Xaser Avatar asked Oct 04 '22 22:10

Xaser


1 Answers

eventually got the solution by trial and error...

When the Debugger looks for the Pipe, it is looking on the local (debugging) machine, not the VM. This pipe maps COM1 of the VM to a named pipe on the local machine.

So in my example I would configure the Target Machine in Visual Studio as follows:

  • Manually configure debugger and do not provision
  • Connection Type: Serial
  • Baud: 115200
  • Pipe: checked
  • Reconnect: checked
  • Pipe name: \\.\pipe\kerneldebug
  • Target Port: COM1

After setting this up

like image 85
Xaser Avatar answered Oct 07 '22 18:10

Xaser