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: probing GDB for MI versions


On Fri, Oct 08, 2004 at 08:29:01PM -0400, 'Bob Rossi' wrote:
> On Fri, Oct 08, 2004 at 10:36:45AM +0200, Eli Zaretskii wrote:
> > > Date: Thu, 7 Oct 2004 18:42:30 -0400
> > > From: 'Bob Rossi' <bob@brasko.net>
> > > Cc: Dave Korn <dk@artimi.com>, gdb@sources.redhat.com
> > > 
> > >    * Have GDB output it's last stable version of MI as the first thing
> > >      it outputs (subset of case above)
> > 
> > Will this solution be satisfactory for you?  That is, when invoked
> > with the -interpreter=mi<N> command-line switch, GDB will print the
> > last stable version of the MI protocol it supports.  This is actually
> > the way many protocol negotiations start, and I don't see why we
> > shouldn't behave the same.
> > 
> > Note that a front end which wants to support older GDB versions will
> > need to have a database of MI versions referenced by GDB versions,
> > because the old GDB versions will not print the MI version.
> > 
> > Are there any disadvantages to this solution?
> 
> Sorry for the delay, I am waiting on the answer for these questions
>    http://sources.redhat.com/ml/gdb/2004-10/msg00267.html
> before I can say if this will be OK for me.

Let's start smaller, everyone seems to be happy with the handshaking
idea. Any objections?

With this idea there are 2 alternatives I can think of.
   * put the handshaking under a different interpreter (-i=mi-handshake)
   * integrate the handshaking as part of the MI protocol (version 3 and on)

I kind of prefer having to call the mi-handshake interpreter explicitly,
and not making it part of the MI protocol. This way, if a front end
wants to start mi3 or any other protocol, they can explicitly state it.
For example, gdb -i=mi3 will start MI protocol version 3 like it always
has. There should be no handshaking involved if the front end selects a
specific version.  If a front end wants to go into handshaking mode to
select a protocol, it can explicitly ask to do so. (gdb -i=mi-handshake)

This is the solution to the problem that I would like to implement, any
objections?

Thanks,
Bob Rossi


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