delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/04/04/22:29:38

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:mime-version
:content-type; q=dns; s=default; b=K9FVs/LwY05xmffhQJ1CdOBunwH+d
AGftRcYxEall5Kj3I1e6SYrh2NTNWE6oGmry28QhgpHB5LJZCgec6uixwCNrym4h
H18fLu5j+Rse+vhV3M5x7W3b3Mg95XlP3arRrLZcHM4CJKi/uAVWzvyI38k1X9of
BArumBI8ql09Z8=
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:mime-version
:content-type; s=default; bh=YFH2YvDv0V9X7DySEXu9GBF4I/E=; b=AOM
q/IlFj1oi8xIgIZYI0NE8ag2FXarxL43qCxz7ETUa1/y8q1k6EApYsnm6VVDgFhg
HxDnK+OmWJomqYQThuiMaNp1TaxGjeg9GgWRPbwWVbY8lzrZ6kZPVUR93nwkQaSe
GbLI+AUSxsFug8cxnCLCthlolP0FkeDjMqPknNI4=
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=2.1 required=5.0 tests=AWL,BAYES_05,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2
X-HELO: mail110.syd.optusnet.com.au
Date: Sat, 5 Apr 2014 13:29:05 +1100
From: Duncan Roe <duncan_roe AT acslink DOT net DOT au>
To: cygwin <cygwin AT cygwin DOT com>
Subject: No I/O redirection under GDB
Message-ID: <20140405022905.GA8268@dimstar.local.net>
Mail-Followup-To: cygwin <cygwin AT cygwin DOT com>
MIME-Version: 1.0
User-Agent: Mutt/1.5.22 (2013-10-16)
X-Optus-CM-Score: 0
X-Optus-CM-Analysis: v=2.1 cv=eojmkOZX c=1 sm=1 tr=0 a=+cDhJlqnNvz9E7c5l3ERGg==:117 a=+cDhJlqnNvz9E7c5l3ERGg==:17 a=y26AOypDAAAA:8 a=PO7r1zJSAAAA:8 a=M1kyBYkWWGkA:10 a=kwppVCPE-NkA:10 a=kj9zAlcOel0A:10 a=iaFubHWvAAAA:8 a=CCpqsmhAAAAA:8 a=mDV3o1hIAAAA:8 a=alyPdV2VR5phpl8Fj-UA:9 a=CjuIK1q_8ugA:10 a=Ox6Cc_31imIA:10 a=vBSyIwTBzAYA:10
X-IsSubscribed: yes

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,

Cheers ... Duncan.

--
 Please avoid sending me Word or PowerPoint attachments.
 See http://www.gnu.org/philosophy/no-word-attachments.html

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