From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18301 invoked by alias); 24 Sep 2003 18:09:46 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 9338 invoked from network); 24 Sep 2003 16:34:57 -0000 Received: from unknown (HELO gateway.macdonnell.ca) (68.145.162.148) by sources.redhat.com with SMTP; 24 Sep 2003 16:34:57 -0000 Received: from macdonnell.ca (desktop.localdomain [192.168.0.4]) by gateway.macdonnell.ca (8.12.10/8.12.10) with ESMTP id h8OGYlcN001503; Wed, 24 Sep 2003 10:34:52 -0600 Message-ID: <3F71C7A8.7070200@macdonnell.ca> Date: Wed, 24 Sep 2003 18:09:00 -0000 From: Creighton MacDonnell User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 To: gdb-patches@sources.redhat.com CC: gdb@sources.redhat.com Subject: Re: Problem with COM1 port with GDB 5.3 under Cygwin 1.5.* References: <3F7099F4.1010405@macdonnell.ca> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-09/txt/msg00295.txt.bz2 I hope CC-ing gdb@sources.redhat.com is the correct thing to do for these posts. I have inserted comments. Eli Zaretskii wrote: >>Date: Tue, 23 Sep 2003 13:07:32 -0600 >>From: Creighton MacDonnell >> >>This patch avoids the Cygwin 1.5.* problem with "com*" port names, while >>still allowing "com*" names to be used in GDB scripts (they get >>translated to "/dev/com?"), and also allows "/dev/ttyS*" and "/dev/com*" >>device names to be used. >> >> >If Cygwin wants /dev/com1 instead of com1, are you sure it won't want >/dev/lpt1 instead of lpt1 as well? > Under either Cygwin 1.3.* or Cygwin 1.5.*: $ ls -l /dev/lpt1 ls: /dev/lpt1: No such file or directory $ ls -l /dev/lpt2 ls: /dev/lpt2: No such file or directory $ ls -l lpt1 ---------- 0 ???????? ???????? 0 Dec 31 1969 lpt1 $ ls -l lpt2 ---------- 1 ???????? ???????? 0 Dec 31 1969 lpt2 So it would have to be "lpt1" and "lpt2" if anything. The Cygwin user guide seems to say that you should be able to use the standard DOS device names from Cygwin scripts. I doubt frankly that the parallel port would work under the current 1.5.* version or the former 1.3.* version. I left this as it was, since there was no obvious alternative. >Anyway, is this a Cygwin bug or what? IIRC, Windows supports both >com1 and /dev/com1, so why doesn't Cygwin do that as well? > The Cygwin user guide says very clearly it should (no explicit mention of "lpt?" though), and under 1.3.* it did. Under Cygwin 1.3.*: $ ls -l /dev/com1 crw-rw-rw- 1 0 0 7, 0 Sep 24 10:18 /dev/com1 $ ls -l /dev/com2 crw-rw-rw- 1 0 0 7, 0 Sep 24 10:18 /dev/com2 $ ls -l com1 crw-rw-rw- 1 0 0 7, 0 Sep 24 10:18 com1 $ ls -l com2 crw-rw-rw- 1 0 0 7, 0 Sep 24 10:19 com2 $ ls -l /dev/ttyS0 crw-rw-rw- 1 0 0 7, 0 Sep 24 10:19 /dev/ttyS0 $ ls -l /dev/ttyS1 crw-rw-rw- 1 0 0 7, 0 Sep 24 10:19 /dev/ttyS1 Under Cygwin 1.5.*: $ ls -l /dev/com1 crw-rw-rw- 1 default None 7, 0 Sep 24 10:21 /dev/com1 $ ls -l /dev/com2 crw-rw-rw- 1 default None 7, 0 Sep 24 10:21 /dev/com2 $ ls -l com1 ---------- 0 ???????? ???????? 0 Dec 31 1969 com1 $ ls -l com2 ---------- 0 ???????? ???????? 0 Dec 31 1969 com2 $ ls -l /dev/ttyS0 crw-rw-rw- 1 default None 7, 0 Sep 24 10:21 /dev/ttyS0 $ ls -l /dev/ttyS1 crw-rw-rw- 1 default None 7, 0 Sep 24 10:21 /dev/ttyS1 This probably is a bug in Cygwin 1.5.*. But I would also like to be able to use "/dev/ttyS*" names for devices, for comptatibilty with Linux, which I also use. And this can only be achieved by changing GDB Also, I am already experienced compiling GDB (and the GNU cross development tools) in order to get tools that do exactly what I want. I have little interest in becoming a Cygwin internals guru. Also, my sense (admittedly as a Cygwin outsider) is that the "/dev/*" names are likley to be better supported in future Cygwin releases. Perhaps it would be best for GDB to avoid the DOS device names, when there is an alternative. >Also, what happens with versions of Cygwin other than 1.5.x? Could >they be broken by this change? > GDB 5.3 with my patch, compiled under Cygwin 1.3.*, will run without being recompiled under 1.5.* too. Beyond that, I don't know. Is anyone on this list using older versions of Cygwin with "target rdi"?