public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* MI and backwards compatibility
@ 2004-10-01 14:25 Bob Rossi
  2004-10-02 16:26 ` Bob Rossi
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Bob Rossi @ 2004-10-01 14:25 UTC (permalink / raw)
  To: GDB

Hi,

Taking Eli's suggestion, I am starting a simple discussion here only on
how front end developers should expect there front end to work with
different versions of GDB.

From Eli Zaretskii <eliz@gnu.org>
> All the MI versions except the latest are kept for one reason only:
> backward compatibility.  So an already existing front end should use
> the version it was written to support, while a new front end should
> use the latest version, the one invoked by "-interpreter=mi".  Doesn't
> this solve the problem?  If not, why not, and what solutions you can
> suggest to solve that?

I guess the *real* problem is how we expect a front end and multiple
versions of GDB work together. I think there needs to be a section in the
documentation that describes backwards compatibility. For instance, I
think that a front end programmed to understand mi1 should always work
with a GDB that is capable of outputting mi1. For instance, here are
some example GDB's and MI versions for demonstration,

GDB version with MI versions

   GDB 1.0 -> mi1
   GDB 2.0 -> mi1,mi2
   GDB 3.0 -> mi1,mi2
   GDB 4.0 -> mi1,mi2,mi3
   GDB 5.0 -> mi1,mi2,mi3,mi4

Front end version which understands MI version
   FE  1.0 -> mi2
   FE  2.0 -> mi2,mi3
   FE  3.0 -> mi2,mi3,mi4

So, here is an example that I don't see to far fetched within the next
few years. The question is, what does backwards compatibility mean?
This is what I expect,

FE 1.0 or after to never work with GDB 1.0
FE 1.0 to work with GDB 2.0 on using mi2.
FE 2.0 to work with GDB 2.0 and 3.0 using mi2
           and with GDB 4.0 on with mi3
FE 3.0 to work with GDB 2.0 and 3.0 using mi2
           and with GDB 4.0 with mi3
           and with GDB 5.0 with mi4

Is this what everyone else expects?

Thanks,
Bob Rossi

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: MI and backwards compatibility
  2004-10-01 14:25 MI and backwards compatibility Bob Rossi
@ 2004-10-02 16:26 ` Bob Rossi
  2004-10-02 17:06   ` Eli Zaretskii
  2004-10-02 16:28 ` Eli Zaretskii
  2004-10-05 19:41 ` Andrew Cagney
  2 siblings, 1 reply; 11+ messages in thread
From: Bob Rossi @ 2004-10-02 16:26 UTC (permalink / raw)
  To: GDB

Ping.

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

This is a general issue and quit frankly a very simple question. Could I
get a response to at least what GDB does now. Then, maybe we can talk
about what it should do, and if it is doing what it should do.

Thanks,
Bob Rossi

On Fri, Oct 01, 2004 at 10:25:17AM -0400, Bob Rossi wrote:
> Hi,
> 
> Taking Eli's suggestion, I am starting a simple discussion here only on
> how front end developers should expect there front end to work with
> different versions of GDB.
> 
> >From Eli Zaretskii <eliz@gnu.org>
> > All the MI versions except the latest are kept for one reason only:
> > backward compatibility.  So an already existing front end should use
> > the version it was written to support, while a new front end should
> > use the latest version, the one invoked by "-interpreter=mi".  Doesn't
> > this solve the problem?  If not, why not, and what solutions you can
> > suggest to solve that?
> 
> I guess the *real* problem is how we expect a front end and multiple
> versions of GDB work together. I think there needs to be a section in the
> documentation that describes backwards compatibility. For instance, I
> think that a front end programmed to understand mi1 should always work
> with a GDB that is capable of outputting mi1. For instance, here are
> some example GDB's and MI versions for demonstration,
> 
> GDB version with MI versions
> 
>    GDB 1.0 -> mi1
>    GDB 2.0 -> mi1,mi2
>    GDB 3.0 -> mi1,mi2
>    GDB 4.0 -> mi1,mi2,mi3
>    GDB 5.0 -> mi1,mi2,mi3,mi4
> 
> Front end version which understands MI version
>    FE  1.0 -> mi2
>    FE  2.0 -> mi2,mi3
>    FE  3.0 -> mi2,mi3,mi4
> 
> So, here is an example that I don't see to far fetched within the next
> few years. The question is, what does backwards compatibility mean?
> This is what I expect,
> 
> FE 1.0 or after to never work with GDB 1.0
> FE 1.0 to work with GDB 2.0 on using mi2.
> FE 2.0 to work with GDB 2.0 and 3.0 using mi2
>            and with GDB 4.0 on with mi3
> FE 3.0 to work with GDB 2.0 and 3.0 using mi2
>            and with GDB 4.0 with mi3
>            and with GDB 5.0 with mi4
> 
> Is this what everyone else expects?
> 
> Thanks,
> Bob Rossi

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: MI and backwards compatibility
  2004-10-01 14:25 MI and backwards compatibility Bob Rossi
  2004-10-02 16:26 ` Bob Rossi
@ 2004-10-02 16:28 ` Eli Zaretskii
  2004-10-02 16:38   ` Bob Rossi
  2004-10-05 19:41 ` Andrew Cagney
  2 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2004-10-02 16:28 UTC (permalink / raw)
  To: Bob Rossi; +Cc: gdb

> Date: Fri, 1 Oct 2004 10:25:17 -0400
> From: Bob Rossi <bob@brasko.net>
> 
> So, here is an example that I don't see to far fetched within the next
> few years. The question is, what does backwards compatibility mean?
> This is what I expect,
> 
> FE 1.0 or after to never work with GDB 1.0
> FE 1.0 to work with GDB 2.0 on using mi2.
> FE 2.0 to work with GDB 2.0 and 3.0 using mi2
>            and with GDB 4.0 on with mi3
> FE 3.0 to work with GDB 2.0 and 3.0 using mi2
>            and with GDB 4.0 with mi3
>            and with GDB 5.0 with mi4

I don't see any problems with what you described.  Am I missing
something?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: MI and backwards compatibility
  2004-10-02 16:28 ` Eli Zaretskii
@ 2004-10-02 16:38   ` Bob Rossi
  2004-10-02 17:24     ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Bob Rossi @ 2004-10-02 16:38 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: gdb

On Sat, Oct 02, 2004 at 06:23:08PM +0200, Eli Zaretskii wrote:
> > Date: Fri, 1 Oct 2004 10:25:17 -0400
> > From: Bob Rossi <bob@brasko.net>
> > 
> > So, here is an example that I don't see to far fetched within the next
> > few years. The question is, what does backwards compatibility mean?
> > This is what I expect,
> > 
> > FE 1.0 or after to never work with GDB 1.0
> > FE 1.0 to work with GDB 2.0 on using mi2.
> > FE 2.0 to work with GDB 2.0 and 3.0 using mi2
> >            and with GDB 4.0 on with mi3
> > FE 3.0 to work with GDB 2.0 and 3.0 using mi2
> >            and with GDB 4.0 with mi3
> >            and with GDB 5.0 with mi4
> 
> I don't see any problems with what you described.  Am I missing
> something?

Are you saying that the goal of GDB is to be backwards compatible with
old MI protocols? That is a simple question that i am asking.

If so, I need the documentation of all of these protocols. I need to
know how to implement an MI1 protocol, MI2 protocol, ...

Thanks,
Bob Rossi

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: MI and backwards compatibility
  2004-10-02 16:26 ` Bob Rossi
@ 2004-10-02 17:06   ` Eli Zaretskii
  2004-10-03  4:53     ` Bob Rossi
  0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2004-10-02 17:06 UTC (permalink / raw)
  To: Bob Rossi; +Cc: gdb

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

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

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: MI and backwards compatibility
  2004-10-02 16:38   ` Bob Rossi
@ 2004-10-02 17:24     ` Eli Zaretskii
  0 siblings, 0 replies; 11+ messages in thread
From: Eli Zaretskii @ 2004-10-02 17:24 UTC (permalink / raw)
  To: Bob Rossi; +Cc: gdb

> Date: Sat, 2 Oct 2004 12:28:22 -0400
> From: Bob Rossi <bob@brasko.net>
> Cc: gdb@sources.redhat.com
> 
> Are you saying that the goal of GDB is to be backwards compatible with
> old MI protocols?

In general, yes.  (Although perhaps we should do a better job.)

> If so, I need the documentation of all of these protocols. I need to
> know how to implement an MI1 protocol, MI2 protocol, ...

I think I answered this in my other message in this thread.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: MI and backwards compatibility
  2004-10-02 17:06   ` Eli Zaretskii
@ 2004-10-03  4:53     ` Bob Rossi
  2004-10-03 15:02       ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Bob Rossi @ 2004-10-03  4:53 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: gdb

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: MI and backwards compatibility
  2004-10-03  4:53     ` Bob Rossi
@ 2004-10-03 15:02       ` Eli Zaretskii
  2004-10-03 16:39         ` Bob Rossi
  0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2004-10-03 15:02 UTC (permalink / raw)
  To: Bob Rossi; +Cc: gdb

> Date: Sat, 2 Oct 2004 13:24:49 -0400
> From: Bob Rossi <bob@brasko.net>
> Cc: gdb@sources.redhat.com
> 
> 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?

It should be the second alternative.  If the first alternative were
true, we wouldn't need to bump the MI version.

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

Shouldn't happen, but if you have examples to the contrary, let's hear
them.

> Is the documentation distributed with each version?

Yes, each GDB distribution includes the documentation.

> 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 don't think it would be a good idea to point people at a mailing
list thread.  What we normally do is when some piece of information
like what is discussed in this thread sounds important to have in the
docs, we add the information itself to gdbint.texinfo or some other
relevant documentation file.

> Finally, thanks for the responding quickly!

You are welcome.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: MI and backwards compatibility
  2004-10-03 15:02       ` Eli Zaretskii
@ 2004-10-03 16:39         ` Bob Rossi
  0 siblings, 0 replies; 11+ messages in thread
From: Bob Rossi @ 2004-10-03 16:39 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: gdb

On Sun, Oct 03, 2004 at 06:50:07AM +0200, Eli Zaretskii wrote:
> > Date: Sat, 2 Oct 2004 13:24:49 -0400
> > From: Bob Rossi <bob@brasko.net>
> > Cc: gdb@sources.redhat.com
> > 
> > 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?
> 
> It should be the second alternative.  If the first alternative were
> true, we wouldn't need to bump the MI version.

OK, so the official stance of the MI protocol within GDB is to be
backwards compatible, and the commands themselves will act differently
for different version of the MI protocol?

Does the testsuite still test all of the MI tests for each protocol that
the current GDB supports ? 
I would consider this to be reasonably important, otherwise, I could see 
that old MI protocol versions would quickly not conform to the output one 
would expect.

> > 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 don't think it would be a good idea to point people at a mailing
> list thread.  What we normally do is when some piece of information
> like what is discussed in this thread sounds important to have in the
> docs, we add the information itself to gdbint.texinfo or some other
> relevant documentation file.

Yes of course, I was suggesting to add a section maybe called "MI
backwards compatibility" that was short and simply just described the
philosophy of backwards compatibility of the MI protocol. 

Thanks,
Bob  Rossi

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: MI and backwards compatibility
  2004-10-01 14:25 MI and backwards compatibility Bob Rossi
  2004-10-02 16:26 ` Bob Rossi
  2004-10-02 16:28 ` Eli Zaretskii
@ 2004-10-05 19:41 ` Andrew Cagney
  2004-10-06  1:01   ` Daniel Jacobowitz
  2 siblings, 1 reply; 11+ messages in thread
From: Andrew Cagney @ 2004-10-05 19:41 UTC (permalink / raw)
  To: Bob Rossi; +Cc: GDB

Other than ensuring that there's a reasonable overlap between EMACS and 
GDB releases, I don't see how this is a GDB problem.  Just keep in mind 
that only the last offical MI release (currently gdb.mi/mi2-*) and 
extensions added since then (gdb.mi/mi1-*) are being covered by GDB's 
testsuite.

Andrew


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: MI and backwards compatibility
  2004-10-05 19:41 ` Andrew Cagney
@ 2004-10-06  1:01   ` Daniel Jacobowitz
  0 siblings, 0 replies; 11+ messages in thread
From: Daniel Jacobowitz @ 2004-10-06  1:01 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Bob Rossi, GDB

On Tue, Oct 05, 2004 at 03:37:48PM -0400, Andrew Cagney wrote:
> Other than ensuring that there's a reasonable overlap between EMACS and 
> GDB releases, I don't see how this is a GDB problem.  Just keep in mind 
> that only the last offical MI release (currently gdb.mi/mi2-*) and 
> extensions added since then (gdb.mi/mi1-*) are being covered by GDB's 
> testsuite.
                               ^^^^^^^^^^^^

You mean mi-*, right?  That's the since-mi2 set.

-- 
Daniel Jacobowitz

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2004-10-05 19:41 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-01 14:25 MI and backwards compatibility Bob Rossi
2004-10-02 16:26 ` Bob Rossi
2004-10-02 17:06   ` Eli Zaretskii
2004-10-03  4:53     ` Bob Rossi
2004-10-03 15:02       ` Eli Zaretskii
2004-10-03 16:39         ` Bob Rossi
2004-10-02 16:28 ` Eli Zaretskii
2004-10-02 16:38   ` Bob Rossi
2004-10-02 17:24     ` Eli Zaretskii
2004-10-05 19:41 ` Andrew Cagney
2004-10-06  1:01   ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).