probing GDB for MI versions

Dave Korn dk@artimi.com
Wed Oct 6 12:13:00 GMT 2004


> -----Original Message-----
> From: gdb-owner On Behalf Of Bob Rossi
> Sent: 06 October 2004 12:39

> Unfortunately this topic is on two different threads. I feel 
> badly that I
> am wasting your time here with bad descriptions of the 
> "catch-22". This
> is to help make my opinion clear on why it is a "catch-22" and not
> possible.
> 
>    The front end has parsers for different versions of GDB's 
> MI protocol. 
>    The parser for MI2 may not work for the MI3 protocol.
>    The parser for the MI3 protocol may not work for the MI2 protocol.
>    The front end *can not* start up GDB just by using -interpreter=mi
>    because it doesn't know what parser to use in this situation.
>    Can we agree on this point for starters?

  No, we can't.  As long as the output from the -mi-version MI command stays
in the same format, you can always parse that and determine which version to
use.  Everything else can change.  You can start up with an utterly minimal,
unintelligent parser, that knows nothing except how to send a -mi-version
command and parse the output; that parser can then direct one of your
version-dependent parsers to take over.

    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....



More information about the Gdb mailing list