public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* How about remote MI?
@ 2006-07-15 14:57 teawater
  2006-07-15 15:13 ` Nick Roberts
  2006-07-17  0:59 ` Daniel Jacobowitz
  0 siblings, 2 replies; 12+ messages in thread
From: teawater @ 2006-07-15 14:57 UTC (permalink / raw)
  To: gdb

Hi all,


In May, I release GDBRUI(http://sourceforge.net/projects/gdbrui/) that
is an interpreter to make GDB can be controlled by the other programe
through TCP. But some people ask me why not extend MI to support TCP.
Now, I think this idea is cool. Does GDB MI support TCP? Maybe I can
extend MI to support TCP. How do you think about it?

BTW, I am trying to make vim2gdb (An vim plug-in to make vim can debug
code through GDB. It use GDBRUI in before.) support MI. But the MI
output format is not very easy to parse. Could some people recommend a
programe or example that parse the MI output for me? If not, I think I
will use lex to parse it.


Thanks,
teawater

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How about remote MI?
  2006-07-15 14:57 How about remote MI? teawater
@ 2006-07-15 15:13 ` Nick Roberts
  2006-07-15 17:27   ` teawater
  2006-07-16 14:08   ` Bob Rossi
  2006-07-17  0:59 ` Daniel Jacobowitz
  1 sibling, 2 replies; 12+ messages in thread
From: Nick Roberts @ 2006-07-15 15:13 UTC (permalink / raw)
  To: teawater; +Cc: gdb

 > In May, I release GDBRUI(http://sourceforge.net/projects/gdbrui/) that
 > is an interpreter to make GDB can be controlled by the other programe
 > through TCP. But some people ask me why not extend MI to support TCP.
 > Now, I think this idea is cool. Does GDB MI support TCP? Maybe I can
 > extend MI to support TCP. How do you think about it?

gdbserver supports TCP.  You can control a remote program using MI and
gdbserver.  MI is a formal interface for use by front ends.  I'm not sure that
gdbrui, as you describe it, fills the same role

 > BTW, I am trying to make vim2gdb (An vim plug-in to make vim can debug
 > code through GDB. It use GDBRUI in before.) support MI. But the MI
 > output format is not very easy to parse. Could some people recommend a
 > programe or example that parse the MI output for me? If not, I think I
 > will use lex to parse it.

I think the idea is that the front end parses it directly.  Generating an
intermediate langusage just adds to the complexity.  If you think MI can
be improved then please make suggestions.


-- 
Nick                                           http://www.inet.net.nz/~nickrob

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How about remote MI?
  2006-07-15 15:13 ` Nick Roberts
@ 2006-07-15 17:27   ` teawater
  2006-07-16  6:42     ` Nick Roberts
  2006-07-16 14:08   ` Bob Rossi
  1 sibling, 1 reply; 12+ messages in thread
From: teawater @ 2006-07-15 17:27 UTC (permalink / raw)
  To: Nick Roberts; +Cc: gdb

On 7/15/06, Nick Roberts <nickrob@snap.net.nz> wrote:
>  > In May, I release GDBRUI(http://sourceforge.net/projects/gdbrui/) that
>  > is an interpreter to make GDB can be controlled by the other programe
>  > through TCP. But some people ask me why not extend MI to support TCP.
>  > Now, I think this idea is cool. Does GDB MI support TCP? Maybe I can
>  > extend MI to support TCP. How do you think about it?
>
> gdbserver supports TCP.  You can control a remote program using MI and
> gdbserver.  MI is a formal interface for use by front ends.  I'm not sure that
> gdbrui, as you describe it, fills the same role
>

MI is an interpreter.
GDBRUI is an interpreter too.
interps.c

>  > BTW, I am trying to make vim2gdb (An vim plug-in to make vim can debug
>  > code through GDB. It use GDBRUI in before.) support MI. But the MI
>  > output format is not very easy to parse. Could some people recommend a
>  > programe or example that parse the MI output for me? If not, I think I
>  > will use lex to parse it.
>
> I think the idea is that the front end parses it directly.  Generating an
> intermediate langusage just adds to the complexity.  If you think MI can
> be improved then please make suggestions.

My means is that I need parse MI output in other programe.

>
>
> --
> Nick                                           http://www.inet.net.nz/~nickrob
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How about remote MI?
  2006-07-15 17:27   ` teawater
@ 2006-07-16  6:42     ` Nick Roberts
  2006-07-16  6:56       ` teawater
  0 siblings, 1 reply; 12+ messages in thread
From: Nick Roberts @ 2006-07-16  6:42 UTC (permalink / raw)
  To: teawater; +Cc: gdb

 > > gdbserver supports TCP.  You can control a remote program using MI and
 > > gdbserver.  MI is a formal interface for use by front ends.  I'm not sure
 > > that gdbrui, as you describe it, fills the same role
 > >
 > 
 > MI is an interpreter.
 > GDBRUI is an interpreter too.
 > interps.c

TUI is an interpreter too, but it's not a machine interface like MI.  I think
you have said that with GDBRUI the user still interacts with the command line
which makes it sound more like TUI.  You may have done something brilliant and
single handedly written an interface that is better than MI, but you don't
currently have mind share.  I think if we are to follow what you have done,
and what you want to achieve, you have to take things in smaller steps.  What
advantages does GDBRUI have over MI?  One or two simple examples would be good
to start with.


-- 
Nick                                           http://www.inet.net.nz/~nickrob

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How about remote MI?
  2006-07-16  6:42     ` Nick Roberts
@ 2006-07-16  6:56       ` teawater
  2006-07-16 12:02         ` Nick Roberts
  0 siblings, 1 reply; 12+ messages in thread
From: teawater @ 2006-07-16  6:56 UTC (permalink / raw)
  To: Nick Roberts; +Cc: gdb

GDBRUI(http://sourceforge.net/projects/gdbrui/) is not like TUI. I
think It like MI. MI support a PIPE interface. GDBRUI support a TCP/IP
interface to other program. So the program that is in another machine
can control GDB via TCP/IP.
So I think maybe I can do some work to make MI support TCP/IP
interface. How do you think about it?

On 7/16/06, Nick Roberts <nickrob@snap.net.nz> wrote:
>  > > gdbserver supports TCP.  You can control a remote program using MI and
>  > > gdbserver.  MI is a formal interface for use by front ends.  I'm not sure
>  > > that gdbrui, as you describe it, fills the same role
>  > >
>  >
>  > MI is an interpreter.
>  > GDBRUI is an interpreter too.
>  > interps.c
>
> TUI is an interpreter too, but it's not a machine interface like MI.  I think
> you have said that with GDBRUI the user still interacts with the command line
> which makes it sound more like TUI.  You may have done something brilliant and
> single handedly written an interface that is better than MI, but you don't
> currently have mind share.  I think if we are to follow what you have done,
> and what you want to achieve, you have to take things in smaller steps.  What
> advantages does GDBRUI have over MI?  One or two simple examples would be good
> to start with.
>
>
> --
> Nick                                           http://www.inet.net.nz/~nickrob
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How about remote MI?
  2006-07-16  6:56       ` teawater
@ 2006-07-16 12:02         ` Nick Roberts
  0 siblings, 0 replies; 12+ messages in thread
From: Nick Roberts @ 2006-07-16 12:02 UTC (permalink / raw)
  To: teawater; +Cc: gdb

 > GDBRUI(http://sourceforge.net/projects/gdbrui/) is not like TUI. I
 > think It like MI. MI support a PIPE interface. 

I thought it used a terminal just as with CLI.  I see no reference to pipes
in the MI section of the manual.

 > GDBRUI support a TCP/IP
 > interface to other program. So the program that is in another machine
 > can control GDB via TCP/IP.
 > So I think maybe I can do some work to make MI support TCP/IP
 > interface. How do you think about it?

I don't see the point, so you'll have to see what Daniel J says.  Maybe he
will understand.

-- 
Nick                                           http://www.inet.net.nz/~nickrob

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How about remote MI?
  2006-07-15 15:13 ` Nick Roberts
  2006-07-15 17:27   ` teawater
@ 2006-07-16 14:08   ` Bob Rossi
  1 sibling, 0 replies; 12+ messages in thread
From: Bob Rossi @ 2006-07-16 14:08 UTC (permalink / raw)
  To: Nick Roberts; +Cc: teawater, gdb

>  > BTW, I am trying to make vim2gdb (An vim plug-in to make vim can debug
>  > code through GDB. It use GDBRUI in before.) support MI. But the MI
>  > output format is not very easy to parse. Could some people recommend a
>  > programe or example that parse the MI output for me? If not, I think I
>  > will use lex to parse it.
> 
> I think the idea is that the front end parses it directly.  Generating an
> intermediate langusage just adds to the complexity.  If you think MI can
> be improved then please make suggestions.

This is simply not true. It is possible to write an MI parser that "works".
However, AFAIK, no one (besides maybe eclispse) has written a production 
quality MI parser that works under all cicumstances, is well tested, ...

Having everyone use there own parser is a lose-lose situation. It will
add to the MI maintaince burden with loads of questions per developer,
it will waste every projects time that wants a parser, and it will give
the community at large a bad sense of GDB front ends (which it already
has BTW) because each not fully tested MI parser will fail in slightly
different boundry cases.

I have started an effort here to provide an MI parser. It is far from
complete. It is not well tested. It does not have documentation.
However, it does syntacticaly parse the output of the test suite.

svn co https://svn.sourceforge.net/svnroot/cgdb/cgdb/trunk/lib/gdbmi
gdbmi

Sometime in the future I will get more time and will eventually get
this silly parser complete. At this point, you can use it to get an AST
of the MI, which is still very useful.

Thanks,
Bob Rossi

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How about remote MI?
  2006-07-15 14:57 How about remote MI? teawater
  2006-07-15 15:13 ` Nick Roberts
@ 2006-07-17  0:59 ` Daniel Jacobowitz
  2006-07-17 13:26   ` teawater
  2006-07-17 13:43   ` Bob Rossi
  1 sibling, 2 replies; 12+ messages in thread
From: Daniel Jacobowitz @ 2006-07-17  0:59 UTC (permalink / raw)
  To: teawater; +Cc: gdb

On Sat, Jul 15, 2006 at 09:50:54PM +0800, teawater wrote:
> Hi all,
> 
> 
> In May, I release GDBRUI(http://sourceforge.net/projects/gdbrui/) that
> is an interpreter to make GDB can be controlled by the other programe
> through TCP. But some people ask me why not extend MI to support TCP.
> Now, I think this idea is cool. Does GDB MI support TCP? Maybe I can
> extend MI to support TCP. How do you think about it?

I do not see the point.  GDB/MI talks to a terminal or a pipe.  If you
want to connect that pipe to a TCP socket, GDB doesn't need to know
that it's a socket.

You can use netcat to connect an arbitrary process to a bidirectional TCP
socket.  There's a bunch of other similar tools, too.

-- 
Daniel Jacobowitz
CodeSourcery

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How about remote MI?
  2006-07-17  0:59 ` Daniel Jacobowitz
@ 2006-07-17 13:26   ` teawater
  2006-07-17 13:43   ` Bob Rossi
  1 sibling, 0 replies; 12+ messages in thread
From: teawater @ 2006-07-17 13:26 UTC (permalink / raw)
  To: drow, gdb

Agree with you.

Thanks,
teawater

On 7/17/06, Daniel Jacobowitz <drow@false.org> wrote:
> On Sat, Jul 15, 2006 at 09:50:54PM +0800, teawater wrote:
> > Hi all,
> >
> >
> > In May, I release GDBRUI(http://sourceforge.net/projects/gdbrui/) that
> > is an interpreter to make GDB can be controlled by the other programe
> > through TCP. But some people ask me why not extend MI to support TCP.
> > Now, I think this idea is cool. Does GDB MI support TCP? Maybe I can
> > extend MI to support TCP. How do you think about it?
>
> I do not see the point.  GDB/MI talks to a terminal or a pipe.  If you
> want to connect that pipe to a TCP socket, GDB doesn't need to know
> that it's a socket.
>
> You can use netcat to connect an arbitrary process to a bidirectional TCP
> socket.  There's a bunch of other similar tools, too.
>
> --
> Daniel Jacobowitz
> CodeSourcery
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How about remote MI?
  2006-07-17  0:59 ` Daniel Jacobowitz
  2006-07-17 13:26   ` teawater
@ 2006-07-17 13:43   ` Bob Rossi
  2006-07-17 13:49     ` Daniel Jacobowitz
  1 sibling, 1 reply; 12+ messages in thread
From: Bob Rossi @ 2006-07-17 13:43 UTC (permalink / raw)
  To: teawater, gdb

On Sun, Jul 16, 2006 at 08:57:20PM -0400, Daniel Jacobowitz wrote:
> On Sat, Jul 15, 2006 at 09:50:54PM +0800, teawater wrote:
> > Hi all,
> > 
> > 
> > In May, I release GDBRUI(http://sourceforge.net/projects/gdbrui/) that
> > is an interpreter to make GDB can be controlled by the other programe
> > through TCP. But some people ask me why not extend MI to support TCP.
> > Now, I think this idea is cool. Does GDB MI support TCP? Maybe I can
> > extend MI to support TCP. How do you think about it?
> 
> I do not see the point.  GDB/MI talks to a terminal or a pipe.  If you
> want to connect that pipe to a TCP socket, GDB doesn't need to know
> that it's a socket.
> 
> You can use netcat to connect an arbitrary process to a bidirectional TCP
> socket.  There's a bunch of other similar tools, too.

There ia at least one possibility I can think of that would improve 
upon GDB/MI by having it connect back to the FE via a TCP socket.

That is, it would avoid the 'tty' issue, by allowing the FE to put a
single pty between the FE and GDB, and having all the MI protocol 
on a totally separate channel.

Bob Rossi

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How about remote MI?
  2006-07-17 13:43   ` Bob Rossi
@ 2006-07-17 13:49     ` Daniel Jacobowitz
  2006-07-17 19:28       ` Bob Rossi
  0 siblings, 1 reply; 12+ messages in thread
From: Daniel Jacobowitz @ 2006-07-17 13:49 UTC (permalink / raw)
  To: Bob Rossi; +Cc: teawater, gdb

On Mon, Jul 17, 2006 at 09:27:10AM -0400, Bob Rossi wrote:
> There ia at least one possibility I can think of that would improve 
> upon GDB/MI by having it connect back to the FE via a TCP socket.
> 
> That is, it would avoid the 'tty' issue, by allowing the FE to put a
> single pty between the FE and GDB, and having all the MI protocol 
> on a totally separate channel.

I don't see any advantage over using the "set tty" command now that
we've got it...

-- 
Daniel Jacobowitz
CodeSourcery

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How about remote MI?
  2006-07-17 13:49     ` Daniel Jacobowitz
@ 2006-07-17 19:28       ` Bob Rossi
  0 siblings, 0 replies; 12+ messages in thread
From: Bob Rossi @ 2006-07-17 19:28 UTC (permalink / raw)
  To: teawater, gdb

On Mon, Jul 17, 2006 at 09:43:20AM -0400, Daniel Jacobowitz wrote:
> On Mon, Jul 17, 2006 at 09:27:10AM -0400, Bob Rossi wrote:
> > There ia at least one possibility I can think of that would improve 
> > upon GDB/MI by having it connect back to the FE via a TCP socket.
> > 
> > That is, it would avoid the 'tty' issue, by allowing the FE to put a
> > single pty between the FE and GDB, and having all the MI protocol 
> > on a totally separate channel.
> 
> I don't see any advantage over using the "set tty" command now that
> we've got it...

OK, the overhead of TCP would be pretty high just to solve that problem.
However, there is a slight problem, and I've made it clear in past
threads. That is, if a front end uses 'set tty' it doesn't know exactly
which process to send signals to.

Yes, this is a minor problem, and I haven't had significant issues with
it yet.

Bob Rossi

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2006-07-17 13:49 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-15 14:57 How about remote MI? teawater
2006-07-15 15:13 ` Nick Roberts
2006-07-15 17:27   ` teawater
2006-07-16  6:42     ` Nick Roberts
2006-07-16  6:56       ` teawater
2006-07-16 12:02         ` Nick Roberts
2006-07-16 14:08   ` Bob Rossi
2006-07-17  0:59 ` Daniel Jacobowitz
2006-07-17 13:26   ` teawater
2006-07-17 13:43   ` Bob Rossi
2006-07-17 13:49     ` Daniel Jacobowitz
2006-07-17 19:28       ` Bob Rossi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).