From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26089 invoked by alias); 29 Nov 2010 02:56:46 -0000 Received: (qmail 26081 invoked by uid 22791); 29 Nov 2010 02:56:45 -0000 X-SWARE-Spam-Status: No, hits=-6.2 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; Mon, 29 Nov 2010 02:56:39 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oAT2ucsu022345 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 28 Nov 2010 21:56:38 -0500 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oAT2uX1Z007013 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 28 Nov 2010 21:56:37 -0500 Received: from host0.dyn.jankratochvil.net (localhost.localdomain [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id oAT2uV6L007410; Mon, 29 Nov 2010 03:56:32 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id oAT2uShI007402; Mon, 29 Nov 2010 03:56:28 +0100 Date: Mon, 29 Nov 2010 02:56:00 -0000 From: Jan Kratochvil To: Marc Khouzam Cc: "gdb@sourceware.org" Subject: Re: Using telnet to control a running GDB Message-ID: <20101129025627.GA4356@host0.dyn.jankratochvil.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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 X-SW-Source: 2010-11/txt/msg00103.txt.bz2 On Sun, 28 Nov 2010 19:27:56 +0100, Marc Khouzam wrote: > The user could ask GDB to open a tcp port which would accept a telnet connection. > Using telnet, the user could then start a _second_ shell to the same GDB and control it. > > This would help a user get a full-fledge GDB command shell, even when GDB > is being run by a frontend. Such shell is present there, isn't it? You have even provided a fix for it: https://bugs.eclipse.org/bugs/show_bug.cgi?id=285320 (eclipse-cdt-6.0.2-5.fc13.x86_64, a bit old, sorry) Click on Debug window, line with "gdb" then I can type CLI GDB commands into the window "Console". It does not print the GDB prompt there but it works. GDB gets this command via MI: 40-interpreter-exec console "print 1+1"N (N=\n) > It would also allow the remote controlling of a running GDB. Could be useful > for troubleshooting. When GDB is really running (and not waiting on external event) it is not thread safe in general to do anything else in that moment. In async (+ non-stop) mode you enabled to be implemented it should never do such operation any noticeable time; if it does, GDB should be fixed (either for missing async or for performance). So it is fully on the front end to provide asynchronous "Console" window interface, isn't it? Thanks, Jan