Re: complete GDB MI specification

Bob Rossi
2004-12-07T18:58:57Z

> > There was a long series of discussions about a month ago, either here
> > or on gdb-patches. Search for "MI" in the archives, and you will find
> > a patch with a formal parser grammar for the MI interface.
> Looked through several (a lot, actually!) discussions and didn't found
> what I need. There were several syntax patches and grammar
> transformations (mostly by Bob Rossi and Michael Chastain), but all of
> them concern general syntax of MI output but don't go into details and
> the output semantics.

I have not had any time to work lately. However, when I get time again,
I plan on formalizing the grammar and hopefully running a parser off of
this grammar through the MI testsuite to verify GDB's output.

Also, I plan on updating the doco to match the actual grammar. I want to
do this because I plan on using this grammar to write a parser capable
of working with GDB for my own personal Free Software project.

> > Please report all such unclear cases, and I will try to fix them.
> Look at the structure of MI description: there are the command syntax
> with explanation and the example of the output. Just an example
> instead of complete output specification. Yes, it fits the general case
> of " var=value (,var=value)* " syntax but the actual semantics and
> possible value pairs are not specified. That is for all commands.

As for semantics, I have not made it this far ....

> Anyway, it looks weird if no rigorous specification of MI output
> exist. IMHO it means (if it is) that no one uses MI in real systems
> (except the tests and demo purposes)...

Well, if you plan on doing this, as I do, it would be helpful if there
were some place's in GDB's doco that we could contribute back information
that we think is helpful.

Meaning if you need semantic information and then you find out about it,
document it somewhere in GDB. This information could be useful later on.
Especially if I ever get around to verifying the MI testsuite with an MI
parser. At that point, not only could we verify the syntax but we could
make sure some of the semantics are correct too.

Thanks,
Bob Rossi