Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Bob Rossi <bob_rossi@cox.net>
To: gdb@sourceware.org
Subject: Re: asynchronous MI output commands
Date: Mon, 08 May 2006 01:22:00 -0000	[thread overview]
Message-ID: <20060508002935.GN25114@brasko.net> (raw)
In-Reply-To: <20060507212711.GA18344@nevyn.them.org>

> > Hmmm. That's interesting, I was hoping to not need to know what the
> > input command was in order to parse and build an ADT for the output. In
> > general, I think it would be appropriate if the MI output described
> > itself well enough that no other information was needed to understand
> > it, including the MI intput command.
> 
> What do you mean, in this context, by an ADT (and what does it mean to
> you)?  And what information do you want to represent in your parse
> result?  I think I need to understand what you want to get out of this
> data a little better.

OK. I start with the MI output. I use bison to convert that into an
abstract parse tree. Now, I am working on a solution to take the
abstract parse tree and turn it into a simple to use representation for
the front end (ADT). I gave the example earlier, taking the abstract parse
tree for -file-list-exec-source-file 
  ^done,line="26",file="test.c",fullname="/home/bob/cvs/cgdb/cgdb.mi/builddir/test.c"
and turn that into
  struct file_list_exec_source_file
  {
    int line;
    char *file;
    char *fullname;
  };
  struct file_list_exec_source_file result = { 26, "test.c", "/home..."};
  
My goal is to do this for each MI output command. I would also like to
make sure the manual reflects all the current MI commands, with the
appropriate fields, and at the end, generate the documentation from this
simple program (with ELI's help). BTW, this is all before I even try to
implement the MI implementation into my front end, so that others can
benefit from this work. Having a LISP or XML output from this program
would be trivial and I'm sure would help others down the road.

> It seems to me that most of the work of an MI parser is in converting
> the RESULT rule to some more useful tree-like structure.  

Yes, this is already done.

> You don't
> need to know what the data is to do that.  If you want to create
> individual response structure types for each supported MI command, then
> you ought to know what command is being answered (see my mail a moment
> ago for why), and be able to convert the _abstract_ tree into an
> appropriate _concrete_ structure.

Yes, I agree, if I knew the MI input command, I could use that to
determine what type of command I was looking at. If I won't be allowed
to add the command to the output record, then this is what I will do.

However, I would like to be able to do this with out knowing the MI input 
command. First, it makes the code more modular that takes the MI output
and turns it into something meaningful. Second, it's easy to gather a
bunch of MI output commands from the test suite or from FE user's with
FE problem, and parse just that output. Third, it validates that what
the user requested is what the user is getting. It is possible that the
FE and GDB could get mixed up I'm assumming.

Anyways, Daniel, thanks for taking time out of your busy schedule to
think about this issue. If you simply don't want something like this in
MI right now, I'll find a way to match the input with the output.

Bob Rossi


  reply	other threads:[~2006-05-08  0:29 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-06  1:26 Bob Rossi
2006-05-06  1:59 ` Daniel Jacobowitz
2006-05-06  2:48   ` Bob Rossi
2006-05-06  3:37     ` Nick Roberts
2006-05-06 15:20       ` Bob Rossi
2006-05-06  4:06     ` Daniel Jacobowitz
2006-05-06  4:05       ` Daniel Jacobowitz
2006-05-06 11:53       ` Bob Rossi
2006-05-06 12:06         ` Bob Rossi
2006-05-06  3:14   ` Bob Rossi
2006-05-06  4:04     ` Nick Roberts
2006-05-06 11:49       ` Daniel Jacobowitz
2006-05-06 11:50         ` Bob Rossi
2006-05-06 16:52           ` Daniel Jacobowitz
2006-05-06 19:45             ` Bob Rossi
2006-05-06 20:37               ` Daniel Jacobowitz
2006-05-07  0:44                 ` Bob Rossi
2006-05-07 20:35                   ` Daniel Jacobowitz
2006-05-07 20:42                     ` Bob Rossi
2006-05-07 22:01                       ` Daniel Jacobowitz
2006-05-08  1:22                         ` Bob Rossi [this message]
2006-05-08  2:03                           ` Daniel Jacobowitz
2006-05-09 21:48                             ` Bob Rossi
2006-05-08  6:38                           ` Nick Roberts
2006-05-08 11:28                             ` Bob Rossi
2006-05-08  1:26                         ` Bob Rossi
2006-05-06 11:51       ` Bob Rossi
2006-05-06  3:27 ` Nick Roberts
2006-05-06 16:40   ` Bob Rossi
     [not found] <1147034156.28828.ezmlm@sourceware.org>
2006-05-07 21:27 ` Bjarke Viksoe
2006-05-07 21:41   ` Daniel Jacobowitz
2006-05-10 12:43     ` Vladimir Prus
2006-05-07 22:30 Bjarke Viksoe
2006-05-07 22:50 ` Daniel Jacobowitz
2006-05-08  0:36   ` Bjarke Viksoe
2006-05-08  1:52     ` Daniel Jacobowitz
2006-05-09  9:46 Alain Magloire
2006-05-10 22:15 Alain Magloire
2006-05-11  3:41 ` Bob Rossi
2006-05-11  8:58   ` Vladimir Prus
2006-05-11 10:48     ` Bob Rossi
2006-05-11 10:52       ` Vladimir Prus
2006-05-11 11:14         ` Bob Rossi
2006-05-11 12:50           ` Vladimir Prus
2006-05-11 14:50             ` Bob Rossi
2006-05-11 15:02 Alain Magloire
2006-05-11 15:42 ` Bob Rossi
2006-05-11 16:40   ` Jim Ingham
2006-05-11 17:03     ` Daniel Jacobowitz
2006-05-11 17:35       ` Jim Ingham
2006-05-11 19:24     ` Bob Rossi
2006-05-11 19:25       ` Jim Ingham
2006-05-12  0:19 Alain Magloire

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=20060508002935.GN25114@brasko.net \
    --to=bob_rossi@cox.net \
    --cc=gdb@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