Re: [patch] MI telnet service

Vladimir Prus
2012-07-17T17:53:48Z

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