This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] MI telnet service


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.



Attachment: mi-telnet.patch
Description: mi-telnet.patch


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]