From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8536 invoked by alias); 8 Jun 2010 17:17:16 -0000 Received: (qmail 8526 invoked by uid 22791); 8 Jun 2010 17:17:14 -0000 X-SWARE-Spam-Status: No, hits=-5.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 08 Jun 2010 17:17:10 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o58HGsRq009406 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 8 Jun 2010 13:16:55 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o58HGrqw009298; Tue, 8 Jun 2010 13:16:53 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o58HGq7n023724; Tue, 8 Jun 2010 13:16:52 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 372653784BE; Tue, 8 Jun 2010 11:16:51 -0600 (MDT) From: Tom Tromey To: dje@google.com (Doug Evans) Cc: gdb-patches@sourceware.org Subject: Re: [RFA] stdio gdbserver connection References: <20100525172715.A9BE38439A@ruffy.mtv.corp.google.com> Reply-To: tromey@redhat.com Date: Tue, 08 Jun 2010 17:17:00 -0000 In-Reply-To: <20100525172715.A9BE38439A@ruffy.mtv.corp.google.com> (Doug Evans's message of "Tue, 25 May 2010 10:27:15 -0700 (PDT)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-06/txt/msg00209.txt.bz2 >>>>> "Doug" == Doug Evans writes: Doug> This patch lets gdbserver communicate via stdio. I didn't see any response to this. I think this seems like a useful feature. I'm not familiar with gdbserver's code, so I won't really review the patch. Doug> One outstanding issue is what to do with inferior stdio. stderr Doug> is ok, it'll just get propagated back to gdb which will display Doug> it. But we don't want inferior stdio to interfere with the gdb Doug> connection. The board description file uses exec-wrapper to Doug> redirect stdin/out to /dev/null. I think gdbserver should do that Doug> itself if the connection is stdio. If the user wants something Doug> else for the inferior's stdio (named pipes or whatever), they can Doug> still use exec-wrapper. Comments? This seems reasonable. It seems like it might also be reasonable to have the default be to route the inferior's stdout to stderr (by default), so plain printfs continue to show up. I think it would be worthwhile to check in this board file. I believe this has come up before -- there are some files like this that are useful but not yet in the tree... Doug> +#define STDIN_FILENO 0 Doug> +#define STDOUT_FILENO 1 Old school :-) How about fileno(stdin)? Tom