Re: probing GDB for MI versions

Andrew Cagney
2004-10-14T18:53:37Z

>>> 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.

Yes, it's good enough. Either:

- GDB is started with -i=mi; gdb reports its version (if anything I'd be
relying on the GDB and not the MI version); your code adjusts
- GDB is started with -i=miX; gdb either barfs or soldiers on; your code
adjusts

Andrew