Re: probing GDB for MI versions

Eli Zaretskii
2004-10-13T20:33:28Z

> Date: Wed, 13 Oct 2004 08:14:12 -0400
> From: 'Bob Rossi' <bob@brasko.net>
> Cc: gdb@sources.redhat.com
>
> > What's wrong with a simpler idea already suggested here: that GDB will
> > output the MI version as part of the starting blurb when invoked with
> > "-interpreter=mi" option?
>
> That method is fine if GDB supports only one stable MI protocol at a
> time. However, I have been told that GDB will support multiple versions
> of MI at a time.

Yes, but Andrew just told you that GDB will most probably support at
most 2 MI versions: the latest one and the one before that. So
printing only the last version is okay, because if that version is not
supported by your front end, you need only to check the previous
version. Isn't that good enough?

(Even if GDB does support more than 2 MI versions, you could still
probe smaller versions until you either (1) find one that is okay with
your front end, or (2) get GDB to fail because the MI version you
requested is not supported.

And if that is still not good enough, let's have GDB output a list of
supported MI versions as part of its starting blurb, e.g. one version
per line.

Will that finally put this issue to rest?