From: Joel Brobecker <brobecker@adacore.com>
To: gdb@sourceware.org
Subject: Re: [mingw32] stdin redirection
Date: Thu, 12 Apr 2007 16:29:00 -0000 [thread overview]
Message-ID: <20070412163113.GK3886@adacore.com> (raw)
In-Reply-To: <20070412160356.GA15004@caradoc.them.org>
> If it helps, I believe that when I was testing that code I had an ssh
> session open from a Linux desktop to my Cygwin system using Cygwin
> sshd, and was running GDB in there. That definitely triggers the pipe
> case.
That's what I'm doing too. Here are the results of some experiments.
This is with GDB 6.6 but I believe everything should be relevant.
Here are the results of the testing:
Unmodified debugger:
1. Interactive mode: fd_is_pipe returns 1
Works.
2. File handle ("gdb < cmds"): fd_is_pipe return 0
Hangs
3. Pipe handle ("cat cmds | gdb"): fd_is_pipe return 1
Works, except that I suspect that the EOF is detected as an
exception condition:
(gdb) Exception condition detected on fd 0
error detected on stdin
Modified debugger (always return 0 in fd_is_pipe): Works in all 3 cases.
I tried:
% (echo "pwd"; sleep 10; echo "pwd") | ./gdb
That worked as well. This confirms your own experience that any
failure is not immediately obvious...
> Of course the console will be a little wonky because of buffering.
Based on one of your recommendation, I modified our sources a while
ago to fix the flushing so that the output would not be garbled.
I offered to post a patch, but noone reacted. I'm reiterating the
offer today...
--
Joel
next prev parent reply other threads:[~2007-04-12 16:29 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-11 13:42 Jerome Guitton
2007-04-11 14:45 ` Daniel Jacobowitz
2007-04-11 14:51 ` Jerome Guitton
2007-04-11 15:12 ` Daniel Jacobowitz
2007-04-12 14:56 ` Joel Brobecker
2007-04-12 15:01 ` Dave Korn
2007-04-12 15:04 ` Dave Korn
[not found] ` <20070412155422.GI3886@adacore.com>
2007-04-12 15:58 ` Dave Korn
2007-04-12 16:06 ` Joel Brobecker
2007-04-12 16:09 ` Dave Korn
2007-04-12 15:12 ` Daniel Jacobowitz
2007-04-12 15:51 ` Joel Brobecker
2007-04-12 16:02 ` Daniel Jacobowitz
2007-04-12 16:04 ` Daniel Jacobowitz
2007-04-12 16:29 ` Joel Brobecker [this message]
2007-04-12 18:23 ` Daniel Jacobowitz
2007-04-12 18:56 ` Daniel Jacobowitz
2007-04-13 9:07 ` Joel Brobecker
2007-04-12 16:46 ` Joel Brobecker
2007-04-12 17:25 ` Dave Korn
2007-04-13 11:47 ` Jerome Guitton
2007-04-12 19:33 ` Eli Zaretskii
2007-04-12 19:37 ` Mark Kettenis
2007-04-12 19:51 ` Daniel Jacobowitz
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=20070412163113.GK3886@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb@sourceware.org \
/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