From: Marc Khouzam <marc.khouzam@ericsson.com>
To: "Abid, Hafiz" <Hafiz_Abid@mentor.com>, Eli Zaretskii <eliz@gnu.org>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: RE: [patch] MI telnet service
Date: Sat, 14 Jul 2012 19:37:00 -0000 [thread overview]
Message-ID: <F7CE05678329534C957159168FA70DEC597936B71D@EUSAACMS0703.eamcs.ericsson.se> (raw)
In-Reply-To: <EB3B29AD43CA924DA27099BC8519237629DFFE@EU-MBX-03.mgc.mentorg.com>
> > -----Original Message-----
> > From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> > owner@sourceware.org] On Behalf Of Eli Zaretskii
> > Sent: Thursday, July 12, 2012 2:29 PM
> > To: Abid, Hafiz
> > Cc: gdb-patches@sourceware.org
> > Subject: Re: [patch] MI telnet service
> >
> > > From: "Abid, Hafiz" <Hafiz_Abid@mentor.com>
> > > Date: Thu, 12 Jul 2012 11:20:36 +0000
> > >
> > > 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)
> >
> > Thanks. A few comments about the documentation part:
> >
> > > +Start a telnet service on the given port. After the service is
> > started,
> > ^^
> > Two spaces between sentences, please (here and elsewhere, including in
> > comments to C code).
> >
> > > +user can connect to the gdb via telnet and execute CLI commands in
> > ^^^
> > "@value{GDBN}" instead of a literal "gdb".
> >
> > > +new one. For telnet service to work, @value{GDBN}
> > > +should be configured with --enable-gdbmitel=yes.
> >
> > Use @option for options, like this: @samp{--enable-gdbmitel=yes}.
> >
> > Btw, why does it make sense to require a configure-time option for
> > this feature? why not include it by default?
>
> It just felt a bit safer to keep it optional. If community thinks that
> it is useful feature then I see no problem in making it available by default.
I think it makes sense to have a way to turn off this feature. Some people may
think it is a security issue to have this port open and wish to keep the feature
completely disabled. However, if Eclipse is to make use of this feature, it
has to be enabled in GDB, and it would complicate things greatly if we had to
ask the user to re-compile GDB to enable this setting. It would be much nicer
if it worked directly in the GDB distributed with their linux box.
Therefore, I hope we can have this setting enabled by default.
I tried out the patch with and without Eclipse and it looks quite good!
Here are some issues I found:
- If I set a tty (-inferior-tty-set), GDB exits (or crashes?) when sending an
empty command (just pressing enter) over telnet. Eclipse uses a tty for the
inferiors.
- For every command sent over telnet, there is a printout in the orinal GDB
saying "Switching to interpreter "console"." Not a big deal, but maybe
something to remove.
- starting the telnet service, connecting to it, and then stopping the
service (-stop-telnet-service), does no seem to clean up the port propertly
and I see:
^error,msg="Error: port 9996 can't be bind"
- If I start GDB in CLI mode, and try to use the telnet service, GDB segfaults
after the first command is sent over telnet. I know this service is not
currently meant to be used with the CLI mode, but it should not crash :)
I personally think this would be cool to have even for CLI mode, but if it
won't be for now, maybe the telnet service should be disabled in that case.
I realize this is a first and important step, but it will be even nicer
when the telnet service supports tab-completion and command-history.
This is very exciting! Thanks!
Marc
next prev parent reply other threads:[~2012-07-14 19:37 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-12 11:21 Abid, Hafiz
2012-07-12 13:19 ` Gary Benson
2012-07-12 14:37 ` Abid, Hafiz
2012-07-12 15:08 ` Gary Benson
2012-07-15 8:13 ` Jan Kratochvil
2012-07-12 13:29 ` Eli Zaretskii
2012-07-12 14:45 ` Abid, Hafiz
2012-07-14 19:37 ` Marc Khouzam [this message]
2012-07-24 16:17 ` Abid, Hafiz
2012-07-24 19:06 ` Marc Khouzam
2012-07-24 20:15 ` Marc Khouzam
2012-07-17 17:53 ` Vladimir Prus
2012-07-25 13:02 ` Jan Kratochvil
2012-07-25 14:12 ` Marc Khouzam
2012-07-25 19:27 ` Jan Kratochvil
2012-07-26 0:02 ` Stan Shebs
2012-07-26 11:51 ` Jan Kratochvil
2012-08-03 11:36 ` Jan Kratochvil
2012-07-25 14:16 ` Abid, Hafiz
2012-07-25 19:29 ` Jan Kratochvil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=F7CE05678329534C957159168FA70DEC597936B71D@EUSAACMS0703.eamcs.ericsson.se \
--to=marc.khouzam@ericsson.com \
--cc=Hafiz_Abid@mentor.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox