From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21439 invoked by alias); 2 Oct 2014 13:46:20 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 21421 invoked by uid 89); 2 Oct 2014 13:46:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 02 Oct 2014 13:46:16 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s92DkEe8028137 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 2 Oct 2014 09:46:15 -0400 Received: from x220.homelab.tallawa.org (ovpn-113-23.phx2.redhat.com [10.3.113.23]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s92DkBiX007844 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 2 Oct 2014 09:46:13 -0400 Message-ID: <542D5723.5000608@redhat.com> Date: Thu, 02 Oct 2014 13:46:00 -0000 From: Cleber Rosa User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 MIME-Version: 1.0 To: gdb@sourceware.org Subject: gdbserver stdout/stderr redirection (or tty) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg00000.txt.bz2 Hi all, Short story: While I'm aware that gdbserver is not inteded to be a "daemonized" version of gdb itself, I wonder if the absence of input/output redirection[1] in gdbserver can be considered a limitation/bug and what is the interest level in having that limitation/bug addressed. Long story: We're working on a test framework that already provides some initial integration with GDB[2]. The architecture used is based on gdbserver+gdb (speaking MI). It starts a gdbserver per debugged process, and a gdb process to interact with it using MI. If an a noteworthy event occurs, it disconnects gdb from the gdbserver, and allows the use to connect to the gdbserver. This architecture was chosen because a very important requirement is allowing users to use *regular*, *unmodified* gdb binaries for this interaction. While this architecture works OK, it does not provide one fundamental feature: getting the output (and less importantly for now, input) right. References: 1 - https://sourceware.org/gdb/current/onlinedocs/gdb/Input_002fOutput.html#Input_002fOutput 2 - http://avocado-framework.readthedocs.org/en/latest/DebuggingWithGDB.html