Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Abid, Hafiz" <Hafiz_Abid@mentor.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: RE: [patch] MI telnet service
Date: Wed, 25 Jul 2012 14:16:00 -0000	[thread overview]
Message-ID: <EB3B29AD43CA924DA27099BC8519237629FABF@EU-MBX-03.mgc.mentorg.com> (raw)
In-Reply-To: <20120725130222.GA4538@host2.jankratochvil.net>

Hi Jan,
Thanks for the review. Some comments inline.

> -----Original Message-----
> From: Jan Kratochvil [mailto:jan.kratochvil@redhat.com]
> Sent: Wednesday, July 25, 2012 2:02 PM
> To: Abid, Hafiz
> Cc: gdb-patches@sourceware.org
> Subject: Re: [patch] MI telnet service
> 
> Hi Abid,
> 
> the testcase is mixing host vs. target execution.  You connect to the
> port
> from the .c program but that can run on a different machine than the
> .exp
> program is running.  It would be better to connect to the port from the
> .exp
> file, in fact you do not need any .c program there at all.  Or if the
> test
> would be done from .c file then you need to skip the test if [is_remote
> target].
I agree that it is better to just test the port from exp file and drop the c file. 

> (It could run if the target is remote but still "localhost" or "stdio"
> but
> that is currently not supported in the GDB testsuite.)
> 
> "gdbmitel" is too cryptic, the option can be very long, with words
> separated
> by dashes.
Ok.

> 
> Have you talked to Eclipse maintainers why they do not provide separate
> console?  In fact they do, I find it more fits there.  If communication
> with
> Eclipse developers has failed GDB can implement it, but I find it more
> as
> Eclipse workaround.
> 
> It does not support IPv6.  GDB currently also does not (for connections
> to
> gdbserver) but that is a bug, I tried to fix it, I hope to resurrect
> the patch
> sometimes again:
> 	[patch] IPv6 support for gdbserver
> 	http://sourceware.org/ml/gdb-patches/2006-09/msg00192.html
> 	http://sourceware.org/ml/gdb-patches/2006-10/msg00073.html
> 
> Opening the port INADDR_ANY should be possible but only with some
> additional
> -start-telnet-service option, services usually open only with
> INADDR_LOOPBACK
> by default. Still there is missing security on multi-user systems, this
> is one
> of the reasons an interface through Eclipse would be more logical to
> me.
> 
> You do not print any errors, such as in:
> +/* This is wrapper over recv. If recv returns some error then it
> closes
> +   the socket.  */
> +static int
> +receive (int *fd, void *buf, size_t n, int flags)
> I believe it could be output as:
> Node: GDB/MI Stream Records
> `"&" STRING-OUTPUT'
>      The log stream contains debugging messages being produced by GDB's
>      internals.
I will fix it.

> 
> I find it only as a last resort possibility now without readline
> support.
> Could it support $TERM negotiation like telnetd supports and attach
> readline
> to it?
Actually I have worked on negotiating the mode with telnet and then connecting the incoming data to readline. But all this was making the patch quite complicated. So I thought to go with a simple patch first and then add the readline letter. 

There has been some suggestions about making it a CLI command. But in that case, we will not be able to attach readline to the socket input as readline is already connected with CLI. I think readline cannot handle 2 parallel streams.

> 
> 
> Thanks,
> Jan


  parent reply	other threads:[~2012-07-25 14:16 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
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 [this message]
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=EB3B29AD43CA924DA27099BC8519237629FABF@EU-MBX-03.mgc.mentorg.com \
    --to=hafiz_abid@mentor.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    /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