This is the mail archive of the gdb-patches@sourceware.org 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: starting gdb/mi from FE


On Mon, Jun 05, 2006 at 03:59:30PM -0400, Daniel Jacobowitz wrote:
> On Mon, Jun 05, 2006 at 09:45:17AM -0400, Bob Rossi wrote:
> > This will allow the FE to start GDB 1 time and to determine which
> > version of the protocol GDB was compatible with. If you have multiple
> > interpreter choices on the -i switch, then GDB will output the first
> > line it writes as
> >     mi_protocol_version=miN
> > where miN will be the version GDB is going to communicate with.
> > 
> > This change is backwards compatible because users were not able in the 
> > past to have a comma separated list in the -i flag.
> > 
> > How does this look?
> 
> We've discussed this at least twice in the past, haven't we?  How about
> a pointer to those past conversations; did they reach a conclusion, or
> not - and if they did, was it this one?

Yes, we have. At least once encouraged by me. I think this time I have
an elegant solution which is much simpler than solutions from the past.

The key to simplicity is to realize that any front end knows a certain 
amount of MI protocols. It's goal is to sink with GDB using the highest
command protocol. So, passing them all in and getting a response is the
easiest way to go.

In the past I implemented a solution where the FE would pass in -i=mi
and GDB would respond with all the versions it supports and then would
wait for a response from the front end giving GDB the version to choose.
This solution also has a MI Handshaking description which front ends
could implement. This patch was never reviewed, probably because it
was overly complicated. This was the start of a very long thread
  http://sourceware.org/ml/gdb/2004-10/msg00027.html

Bob Rossi


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