Re: probing GDB for MI versions

Bob Rossi
2004-10-19T20:17:03Z

On Tue, Oct 19, 2004 at 12:28:26PM -0700, Felix Lee wrote:
> Bob Rossi <bob@brasko.net>:
> > * *requires* a restart
>
> there's no difference between running
> gdb -print-stable-mi-version
> and running
> printf "quit\n" | gdb -interpreter=mi

Yes, I understand, that's why it is obvious and intuitive to have a
negotiation. This requires little code and is clearly an algorithmic way
for the front end to get it correct each time.

> > * requires printing the latest stable version even though GDB may not be
> > even speaking that version
>
> 'gdb -interpreter=mi' should start the latest stable version, not
> the latest version. so if mi5 is stable and mi6 is unstable,
> you'd have to say '-interpreter=mi6' to get the unstable version.

Is this a fact? That is good news and a misunderstanding on my part!

> > * says *nothing* about other versions that GDB supports
>
> so print a list of versions. this was already mentioned a couple
> times. there's no difference between running
> gdb -print-all-mi-versions
> and running
> printf "info mi\nquit\n" | gdb -interpreter=mi
>
> > * gives no way for a front end to determine if it is using a
> > deprecated protocol.
>
> this can be information in the list of versions.

OK, that would be good.

> > * puts the bug finding of the MI protocol on the users, even though the
> > protocols have been deprecated.
>
> this is a problem everywhere and difficult to solve in general.
> the first thought most people will have is "maybe it's fixed in a
> newer version", and it's pretty easy to try a newer gdb version.
> also, assume that anyone who knows how to use gdb also knows how
> to search for an answer with Google and/or file a bug report.
>
> Bob, I think this discussion would have been finished a long time
> ago if you had just submitted a patch for gdb that did what you
> wanted. the first attempt might get some discussion and need
> some modification before getting accepted, but that usually
> doesn't take very long.
>
> most of this argument has been about people saying basically,
> "well, if I were doing it, I'd do it differently", which is just
> quibbling for an issue as simple as this. gdb, like most
> volunteer projects, never has enough manpower to do everything
> that "should" be done. development is always about evolution in
> response to demand.
>
> the project is the sum of what people care about, and you care
> the most about this issue. any patch you submit has an automatic
> advantage over everyone else's lack of interest in working on
> this issue, and the gdb people are usually happy to incorporate
> anything that isn't egregiously bad.
> --

Thanks Felix, I'll come up with something and let you guys tear it
apart! I just didn't want to start something and waste my time on it.

Thanks,
Bob Rossi