From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4154 invoked by alias); 17 Jul 2012 17:53:48 -0000 Received: (qmail 4145 invoked by uid 22791); 17 Jul 2012 17:53:47 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from plane.gmane.org (HELO plane.gmane.org) (80.91.229.3) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 17 Jul 2012 17:53:28 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SrBxd-00047Q-Hm for gdb-patches@sources.redhat.com; Tue, 17 Jul 2012 19:53:25 +0200 Received: from h86-62-88-129.ln.rinet.ru ([86.62.88.129]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 17 Jul 2012 19:53:25 +0200 Received: from ghost by h86-62-88-129.ln.rinet.ru with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 17 Jul 2012 19:53:25 +0200 To: gdb-patches@sources.redhat.com From: Vladimir Prus Subject: Re: [patch] MI telnet service Date: Tue, 17 Jul 2012 17:53:00 -0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 In-Reply-To: X-IsSubscribed: yes 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: 2012-07/txt/msg00236.txt.bz2 On 12.07.2012 15:20, Abid, Hafiz wrote: > Hi, > This patch provides implementation of telnet service. This is based on initial work by Grigory Tolstolytkin.(http://sourceware.org/ml/gdb-patches/2011-11/msg00466.html) > > This service can accept and execute CLI commands from the remote user. It can be started by MI command "-start-telnet-service [port]". After the service is running, user can connect to the GDB via telnet and execute CLI commands in parallel with existing MI interface. This service can be stopped by another MI command "-stop-telnet-service". For these commands to work, GDB has to be configured with --enable-gdbmitel=yes. > > This service can be useful, for example, when GDB is running as a backend of an IDE. Testing infrastructure can run the tests by sending commands through socket. In case of an error, a user can debug the problem in the IDE. > > The test case that I added only checks that port is opened after the service is started. I am looking to improve it and would appreciate if the reviewers can help me with some ideas. > > How does it all look? Hi Abid, it seems to me that the essential part of this patch does not have much to do with MI proper, and therefore it should live outside of 'mi' subdirectory. > * mi/mi-cmds.c (mi_cmds): Add -start-telnet-service > and stop-telnet-service MI commands. > * mi/mi-cmds.h (mi_cmd_start_telnet_service): Add declaration. > (mi_cmd_stop_telnet_service): Add declaration. These changes, well, all 8 lines, look OK. > * mi/mi-telnet.c: New file. Beyond the suggestion that this code not be put under 'mi' directory, I have no say about the idea or implementation. Thanks, Volodya