Re: probing GDB for MI versions

Eli Zaretskii
2004-10-04T05:04:43Z

> Date: Sun, 3 Oct 2004 13:01:04 -0400
> From: Bob Rossi <bob@brasko.net>
>
> gdb --mi-protocols
> MI1
> MI2
> MI3
>
> What does everyone think? With this command, it would be safe to say
> that I could always probe GDB to figure out what version of MI the front
> end should use with the current GDB.

If at all, I'd prefer this to be an MI command, not a command-line
switch.

It won't solve this problem, of course:

> The only problem with this approach is that it obviously won't work for
> GDB's before this command was implemented. However, in that case, the
> user can either assume MI1 (if that's the only publically released
> version) or they can try MI2.

To solve that, a front end that is willing to support old versions of
GDB will need to have a database of old GDB versions and the MI
versions they supported. A front end could have this database for all
versions of GDB, which is why the benefit from adding the suggested
command is relatively small, IMHO.