This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: MI and backwards compatibility


On Sat, Oct 02, 2004 at 06:35:01PM +0200, Eli Zaretskii wrote:
> > Date: Sat, 2 Oct 2004 11:38:15 -0400
> > From: Bob Rossi <bob@brasko.net>
> > 
> > Ping.
> 
> Well, one day without a response is hardly a good reason for a ping,
> I'd say.  Especially during weekends.  I suggest to be slightly more
> patient.

OK

> > I guess the main questions is, is the goal of GDB to support old
> > versions of MI? For instance, if GDB is currently at MI3, will it
> > support a front end that only knows MI2?
> 
> It should, and it does in most cases.
> 
> In those cases where the new MI version is too incompatible with the
> previous one, we provide a suitable -interpreter=mi<N> switch to
> alleviate the problem.
> 
> Thus, a frond-end which is known not to work with a new MI version
> should use an explicit -interpreter=mi<N> switch when it invokes GDB.
> The -version command-line switch is available to find out what GDB
> version you are running with.

OK, this is understood and makes sense. I have one last question.

If for example the -break-list command in the MI3 protocol becomes 
incompatible with the -break-list command that was in the MI2 protocol, 
and the MI version is bumped from 2 to 3 because of it, 

   * will -break-list be left around for old front ends that use MI2 and a 
   new MI command -break-list-new be created for front ends that use MI3?

   * will -break-list act differently in MI2 mode than it will for MI3
     mode?

   or the very bad broken case,

   * will -break-list act the new way in both MI2 and MI3 mode?

I have a gut feeling that the last case is the case GDB currently acts
like, and this is what I am worried about. 

> > If so, then I need the
> > documentation for the MI2 interface if I want to make my front end work
> > with that version of the protocol.
> 
> If needed, you can find the documentation of the MI2 interface in the
> GDB documentation of the last version that supported MI2 as its
> default MI interpreter.
> 
> However, I don't see why would you need to look up the old manual: the
> previous versions of MI are maintained for those front ends that are
> already written, so that they will not need anything beyond an
> explicit mi<N> request to run with a version of GDB that was released
> after the fron end.  Thus, a front end which is being developed
> _after_ MI3 is released will not need to support MI2 in most cases,
> right?

OK, this seems fair enough. Is the documentation distributed with each
version?

BTW, I think it would be helpful to put the information on this thread
in the MI doco, so that front end developers understand the compatibility
philosophy of GDB's MI interface. I'd be glad to come up with something,
even though I might not be great with words :)

Finally, thanks for the responding quickly!

Thanks,
Bob Rossi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]