Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro_alves@portugalmail.pt>
To: Pierre Muller <muller@ics.u-strasbg.fr>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC] gdb/testsuite/gdb.base/fileio.exp patch for cygwin
Date: Wed, 05 Dec 2007 22:56:00 -0000	[thread overview]
Message-ID: <47572C79.5060103@portugalmail.pt> (raw)
In-Reply-To: <001501c8371a$0a58faa0$1f0aefe0$@u-strasbg.fr>

Pierre Muller wrote:
>   I am sorry, Pedro,
> but I am completely unable to reproduce
> your output.
>   I always get '1' as a result for all the tests
> I tried running your application.

Blurfh.  I first tried doing a make check with the
patch I attached on my previous message, and with a
hacked fileio.c to see what gdb and the inferior
stdin/out/err streams were.  The result is something like:

(output a bit different from the previous patch to
  make it clearer what is what)

make check RUNTESTFLAGS="--target_board=cygwin fileio.exp"

(...)
spawn
/cygdrive/d/cegccsf/cegcc/cegcc/src/build-gdb_server_cygwin_submit/gdb/testsuite/../../gdb/gdb 

-nw -nx
gdb: isatty (0) = 1, ttyname (0) = /dev/tty1
gdb: isatty (1) = 1, ttyname (1) = /dev/tty1
gdb: isatty (2) = 1, ttyname (2) = /dev/tty1
GNU gdb 6.7.50.20071201-cvs
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-cygwin".

(...)

(gdb) run
Starting program:
/cygdrive/d/cegccsf/cegcc/cegcc/src/build-gdb_server_cygwin_submit/gdb/testsuite/gdb.base/fileio.exe 



Breakpoint 1, main () at
../../../gdb-server_submit/src/gdb/testsuite/gdb.base/fileio.c:546
546	  for (i = 0; i < 3; i++)
(gdb) break stop
Breakpoint 2: file
../../../gdb-server_submit/src/gdb/testsuite/gdb.base/fileio.c, line 71.
(gdb) continue
Continuing.
inf: isatty (0) = 0, ttyname (0) = (null)
inf: isatty (1) = 0, ttyname (1) = (null)
inf: isatty (2) = 0, ttyname (2) = (null)

Seeing this, I tried the example standalone/non-dejagnu
test I posted, but with CYGWIN=tty, which produces the
exact same results dejagnu sees.

I then removed 'tty' from CYGWIN, but failed to
restart every cygwin process, which made me fail to
see what you saw.  Which shows:

>gdb ./main.exe
gdb: isatty (0) = 1, ttyname (0) = /dev/console
gdb: isatty (1) = 1, ttyname (1) = /dev/console
gdb: isatty (2) = 1, ttyname (2) = /dev/console
GNU gdb 6.7.50.20071201-cvs
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-cygwin"...
(gdb) r
Starting program: /home/pedro/isatty/main.exe
inf: isatty (0) = 1, ttyname (0) = /dev/console
inf: isatty (1) = 1, ttyname (1) = /dev/console
inf: isatty (2) = 1, ttyname (2) = /dev/console

Program exited normally.
(gdb)

Which is the behaviour I was expecting:
  "I don't know enough of the Cygwin tty support,
  but I would expect that if gdb had a (Windows) console
  attached (bash started from cmd.exe, not the xterm or rxvt),
  the inferior would inherit it, and the runtime would arrange
  for the isatty to be true, but that doesn't seem to hold."

Sorry for the confusion.

So, the excelent description Corinna posted applies
to the dejagnu case here.

-- 
Pedro Alves


  reply	other threads:[~2007-12-05 22:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-03 10:02 Pierre Muller
2007-12-04 23:50 ` Pedro Alves
2007-12-05  9:22   ` Pierre Muller
2007-12-05 22:56     ` Pedro Alves [this message]
2007-12-05 12:17   ` Corinna Vinschen
2007-12-05 19:19     ` Eli Zaretskii
2007-12-05 23:01     ` Pedro Alves
2007-12-06  1:06       ` Daniel Jacobowitz
2007-12-06  3:42         ` Pedro Alves
2007-12-06  4:25           ` Pedro Alves
2007-12-06 11:21             ` Corinna Vinschen
2007-12-07 13:54               ` Christopher Faylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47572C79.5060103@portugalmail.pt \
    --to=pedro_alves@portugalmail.pt \
    --cc=gdb-patches@sourceware.org \
    --cc=muller@ics.u-strasbg.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox