[patch] MI telnet service

Abid, Hafiz Hafiz_Abid@mentor.com
Thu Jul 12 11:21:00 GMT 2012


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?

Regards,
Abid

2012-07-12  Hafiz Abid Qadeer  <abidh@codesourcery.com>

      * Makefile.in: Variable definitions related to mi-telnet.c.
      (mi-telnet.o): New rule.
      * configure.ac: Add AC_ARG_ENABLE(gdbmitel).
      * configure: Generated.
      * 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.
      * mi/mi-telnet.c: New file.
      * gdb/testsuite:
               gdb.mi/mi-telnet.exp: New file
               gdb.mi/mi-telnet.c: New file
      * gdb.texinfo (Miscellaneous GDB/MI Commands): Added 
      -start-telnet-service and -stop-telnet-service.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: mi-telnet.patch
Type: application/octet-stream
Size: 29537 bytes
Desc: mi-telnet.patch
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20120712/134b07f0/attachment.obj>


More information about the Gdb-patches mailing list