Re: probing GDB for MI versions

'Bob Rossi'
2004-10-06T17:14:49Z

On Wed, Oct 06, 2004 at 01:03:14PM -0400, Nathan J. Williams wrote:
> "'Bob Rossi'" <bob@brasko.net> writes:
>
> > It is now a formal requirement of the GDB group
>
> I am not a particular representative of GDB or its formal decisions. I
> am mostly in the sidelines of GDB development, though I happen to have
> some limited commit access. Please do not mistake my remarks, mostly
> informed just by watching this list, as representing the official
> decisions of some body to which I do not belong.
>
> > The whole reason an MI grammar was invented was so that there were no
> > "utterly minimal, unintelligent parser" nonsense going on in front ends.
>
> Well, if you want to interrogate GDB for what versions it has
> avaliable (as in your suggestion for a command line option), you have
> to do that somewhere, and that will still take some parsing. Would it
> make you happy if the mechanism for doing that was declared, formally,
> not to be part of MI and its grammar, but just a suspiciously
> similar-looking interactive command?

Yes, that is a great idea! and it would make me even me happy!

GDB -i=list-protocols
mi1
mi2
mi3
annotate1
annotate2

There could be an interpreter that is only capable of outputting the
protocols of MI that it officially supports. We could document that it
will output one officially supported protocol on a line. This would make
me very happy. At the same time, we could output the annotate version
also.

Thanks,
Bob Rossi