public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Jim Ingham <jingham@apple.com>
To: gdb@sources.redhat.com
Subject: Re: GDB/XMI (XML Machine Interface)
Date: Tue, 10 Aug 2004 23:02:00 -0000	[thread overview]
Message-ID: <4F8671D3-EB21-11D8-A697-000A958F4C44@apple.com> (raw)
In-Reply-To: <1092177534.30930.ezmlm@sources.redhat.com>

This seems like a worthy effort, since there are XML parsers out there 
for folks to use.

I have just a couple of comments about this.

1) You can run gdb and use the tty command to send inferior output to a 
separate pty.  That's what we do with Xcode, and it works fine.  This 
should work fine on all Unix systems, and under Cygwin.  We should use 
this solution to separate the output, and fix anywhere it doesn't work. 
  That seems much simpler than the whole escape code thing...

2) The XML output should just be another ui_out.  If there is any 
reason that the ui_out architecture doesn't support outputting XML, it 
should be enhanced to do that.  We definitely DON'T need another output 
gathering architecture (having now both ui_out and annotate...).  I 
think it should work pretty straightforwardly.  This will allow gdb to 
continue supporting the MI for any clients that use it while you are 
developing the XML version.  It should also mean that you can just plug 
in the XML version of the ui_out into the existing MI commands, so you 
could share the command implementations with the regular MI.

3) From our usage, the most annoying part of the MI is that the input 
command syntax is not well specified, and is still too much like a 
human interface (-break-insert should take -file & -line or -address, 
not rely solely on decode_line_1, there are still magic cookies all 
over the place, etc.)

The input is also where you need to be most careful about change in the 
commands.  Right now, if you add elements to the output, it is pretty 
easy to just ignore them.  But if you change the input, the UI usually 
does have to change to support them.  If more of the commands had a 
-flag value or similar structure, and were not order dependent, then 
you could ignore new options till you needed them, and it would be 
easier to write a robust driver.

So if you are really concerned about making a robust machine interface, 
I think you have to address the input side of things.

OTOH, as a developer of MI commands, you DO end up typing them into the 
MI a lot as you are working on gdb.  So I would not favor using XML 
input.  XML is very verbose, and having to type XML at gdb all the time 
would really drive me mad!  It is also overkill.  Some kind of flag 
value syntax would work just fine.

Jim

On Aug 10, 2004, at 3:38 PM, gdb-digest-help@sources.redhat.com wrote:

>
>
> Hi,
>
> As most of you know, I have been writing a front end to GDB called 
> CGDB.
> However, for a while now, I have been a little disappointed with the MI
> interface. In my RFC I have described the problems I have with MI and I
> have proposed a new method of communication between GDB and the front
> end.
>
> If there is good feedback on this RFC, I will continue research on it,
> filling in details that I thought would be best to wait until after an
> initial acceptance.
>
> If the RFC is accepted by the community I plan on implementing an
> initial version of the XMI interface in GDB, and programming CGDB to
> sit on top of GDB. This will at least give the community one open
> source front end to GDB and an example to prove that the new
> machine interface works.
>
> I can't wait to hear your opinions/comments.
>
> Thanks,
> Bob Rossi

       reply	other threads:[~2004-08-10 23:02 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1092177534.30930.ezmlm@sources.redhat.com>
2004-08-10 23:02 ` Jim Ingham [this message]
     [not found] <message on Sat, 21 Aug 2004 14:28:52 PDT from Felix Lee <felix.1@canids.net>
2004-08-22  2:55 ` Felix Lee
2004-08-23  0:33   ` Bob Rossi
2004-08-23  9:27   ` Fabian Cenedese
     [not found] <5956F1E2-EB0D-11D8-9949-000A9569836A@apple.com>
2004-08-11  0:51 ` Chris Friesen
     [not found]   ` <gdb001@speakeasy.net>
2004-08-11  6:28     ` Felix Lee
2004-08-11  8:25       ` Chris Friesen
2004-08-11 22:43     ` Felix Lee
2004-08-20 10:34     ` Felix Lee
2004-08-20 12:54       ` Bob Rossi
2004-08-20 18:34         ` Daniel Jacobowitz
2004-08-20 18:49           ` Bob Rossi
2004-08-20 18:52             ` Daniel Jacobowitz
2004-08-20 19:25               ` Bob Rossi
2004-08-20 19:42                 ` Daniel Jacobowitz
2004-08-20 19:59                   ` Bob Rossi
2004-08-21 10:25                     ` Eli Zaretskii
2004-08-21 12:34                       ` Bob Rossi
2004-08-21 13:34                         ` Eli Zaretskii
     [not found]           ` <drow@false.org>
2004-08-20 19:06             ` Felix Lee
2004-08-20 19:09               ` Daniel Jacobowitz
2004-08-20 19:20             ` Felix Lee
2004-08-21 12:37               ` Bob Rossi
     [not found]         ` <bob@brasko.net>
2004-08-20 18:20           ` Felix Lee
2004-08-20 21:34           ` Felix Lee
2004-08-21 19:21           ` Felix Lee
2004-08-21 20:21             ` Bob Rossi
2004-08-21 19:28           ` Felix Lee
2004-08-21 20:16             ` Bob Rossi
2004-08-21 21:28           ` Felix Lee
2004-08-21 22:37           ` Felix Lee
2004-08-10 20:14 Bob Rossi
2004-08-10 22:38 ` Kip Macy
2004-08-11  0:17 ` Michael Chastain
2004-08-11  7:36 ` Fabian Cenedese
2004-08-11  8:51 ` Nick NoSpam
2004-08-11 18:05 ` Bob Rossi
2004-08-11 19:26   ` Alain Magloire
2004-08-11 22:35     ` Jason Molenda
2004-08-12 13:03       ` Nick NoSpam
2004-08-19 23:49 ` Bob Rossi
2004-08-20  7:09   ` Chris Friesen
2004-08-20 12:47     ` Bob Rossi

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=4F8671D3-EB21-11D8-A697-000A958F4C44@apple.com \
    --to=jingham@apple.com \
    --cc=gdb@sources.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).