delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/04/26/19:58:54

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL,TW_YG,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Message-ID: <4F99E11A.4060900@cs.utoronto.ca>
Date: Thu, 26 Apr 2012 19:58:18 -0400
From: Ryan Johnson <ryan DOT johnson AT cs DOT utoronto DOT ca>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120327 Thunderbird/11.0.1
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: How to access /dev/ttyS* ?
References: <4F996E5A DOT 60804 AT cs DOT utoronto DOT ca> <20120426200451 DOT GD28119 AT calimero DOT vinschen DOT de>
In-Reply-To: <20120426200451.GD28119@calimero.vinschen.de>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On 26/04/2012 4:04 PM, Corinna Vinschen wrote:
> On Apr 26 11:48, Ryan Johnson wrote:
>> Hi all,
>>
>> I'm trying to connect a VirtualBox guest's serial port to something
>> that cygwin/gdb can access for remote debugging, and am having
>> trouble connecting the pieces...
>>
>> One post from a couple of years ago [1] suggests using /dev/ttyS* to
>> access COM ports. This would work great... except there are no
>> /dev/ttyS* on my install.
> If the VM has a virtual HW serial port configured, you should see a
> /dev/ttyS0 entry.  If it's not there, you didn't configure it.  Cygwin
> in the guest can only access what is available in the guest OS.  If
> there's a COM1, Cygwin has a /dev/ttyS0.
Ah, I'm trying to debug a linux guest from cygwin/win7 host. I guess the 
problem is my laptop doesn't have a physical COM1 port, so there's no 
way to route anything to it (and nothing for cygwin to display in /dev).

>> The other VirtualBox option is to create a named pipe (as in Windows
>> NPFS), and then wrap it into a pty using socat [2], but I can't
>> figure out how to access such a pipe from cygwin -- the "\\.\pipe\*"
>> path doesn't seem to be supported by cygpath and there's nothing
>> obvious in /dev/.
> I don't know how that's supposed to work, but you could try to
> connect it via /proc/sys/Device/NamedPipe/<name-of-named-pipe>
> No guarantee that it works, though.
No love... I get "no such process." In retrospect I shouldn't have 
expected that to work, tho. Named pipes are undoubtedly very different 
beasts in Windows vs Posix.

It looks like my options are to run a second VM that points at the same 
named pipe and debug from within it, or use vmwaregateway [1] to convert 
it to TCP so my cygwin-based gdb can connect to it.  Both work.

[1] http://www.l4ka.org/91.php

Thanks anyway,
Ryan




--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019