delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/04/05/05:24:14

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:references
:mime-version:content-type:in-reply-to; q=dns; s=default; b=oRwY
zrsUyZbIB/lDKomZv6UByXWnEfTbGjGEsad9rVBqN+p3PE9oV2XfvQiL+pxnGWmS
efF6+eTxBFvpkxAADQ+A9eexg8BeLBr5aRrvxm2VnFPzTqyxTzUWBstRzd5Z2L9N
QJYXUtO7LE2zx10gCAoTXNVGxxdFvY6M5H0ZOcY=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:references
:mime-version:content-type:in-reply-to; s=default; bh=qLIFU7Mmx6
fQcvfizH4qomIbKIA=; b=XUTEyfyNKhc2Yxi47GMU+R6/EoyRxTTrGRjiUZ0mfm
53Xjvp0FY590xlV9J+RB7TttFtrdpz/ZwjrMyP0nKTgYQCcMiEcJQf3vXLfgNz1O
Smk1m5VhkBlAZJ5VHVMX9tWfEIApvxwHMbgYhBf0zNQnAytNWfp6MqLzNDhJrOBE
s=
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2
X-HELO: mail105.syd.optusnet.com.au
Date: Sat, 5 Apr 2014 20:23:37 +1100
From: Duncan Roe <duncan_roe AT acslink DOT net DOT au>
To: cygwin AT cygwin DOT com
Subject: NOT WORKED AROUND Re: No I/O redirection under GDB
Message-ID: <20140405092337.GC8268@dimstar.local.net>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20140405022905 DOT GA8268 AT dimstar DOT local DOT net> <533F6FAC DOT 5060200 AT cs DOT umass DOT edu> <20140405041514 DOT GB8268 AT dimstar DOT local DOT net>
MIME-Version: 1.0
In-Reply-To: <20140405041514.GB8268@dimstar.local.net>
User-Agent: Mutt/1.5.22 (2013-10-16)
X-Optus-CM-Score: 0
X-Optus-CM-Analysis: v=2.1 cv=PqKqMW83 c=1 sm=1 tr=0 a=+cDhJlqnNvz9E7c5l3ERGg==:117 a=+cDhJlqnNvz9E7c5l3ERGg==:17 a=y26AOypDAAAA:8 a=PO7r1zJSAAAA:8 a=M1kyBYkWWGkA:10 a=GIt_Rz7XouEA:10 a=kj9zAlcOel0A:10 a=iaFubHWvAAAA:8 a=CCpqsmhAAAAA:8 a=w1T44OW-DsIijFcKTwIA:9 a=CjuIK1q_8ugA:10 a=Ox6Cc_31imIA:10 a=lXIItB0-HAIA:10
X-IsSubscribed: yes

Sorry for the noise everyone.

I started to compose the last mail thinking "set inferior-tty" would solve my
problem. Then on further testing, I found it didn't.

I'm still up for fixing gdb to do the job properly - or can someone on this list
tell me why I'd be wasting my time?

Cheers ... Duncan.

On Sat, Apr 05, 2014 at 03:15:14PM +1100, Duncan Roe wrote:
> On Fri, Apr 04, 2014 at 10:51:24PM -0400, Eliot Moss wrote:
> > On 4/4/2014 10:29 PM, Duncan Roe wrote:
> > >I just found that gdb's "run" command doesn't action redirection (e.g. run
> > ></dev/pty2 >/dev/pty2 2>&1, where the shell on /dev/pty2 is doing a long sleep).
> > >Instead, the invoked program gets the redirections as command line arguments.
> > >
> > >Looking through the archives, I found
> > >https://sourceware.org/ml/cygwin/1999-04/msg00355.html documenting this
> > >behaviour. Chris Faylor commented at the time that fixing it was more trouble
> > >than it appeared.
> > >
> > >That was 15 years ago - has anything changed since? Anyone up for this or should
> > >I have a go? I *could* simply make my target do the redirection itself, but that
> > >doesn't help anyone else. OTOH if changing gdb really *is* that hard, maybe I
> > >should just change my program anyway.
> > >
> > >Any advice welcomed,
> >
> > I think this is the intended design (see:
> > https://sourceware.org/gdb/current/onlinedocs/gdb/Input_002fOutput.html#Input_002fOutput
> > ).  If you want *gdb's* input and output redirected, I would think you want to invoke
> > gdb with I/O redirection on the command line, as in:
> >
> > gdb foo < infile > outfile
> >
> > Regards -- Eliot Moss
> >
> Thanks for replying.
>
> Sorry but your suggested command line doesn't help: I need gdb command i/o in
> one screen and program i/o in another.
>
> The set inferior-tty command documented in the link you posted *very nearly*
> gave me what I was after. Having updated my startup script to use it, I now find
> that I can't use Control-C to interrupt the session: it's ignored in the gdb
> window and causes catastrophic gdb failure in the application window (as well as
> waking the shell from sleep). It's better than nothing I guess.
>
> So, I'm back to needing i/o redirection in the run command (as also documented
> in your link). It works in Linux.
>
> Cheers ... Duncan.

--
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