This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
RE: probing GDB for MI versions
- From: "Dave Korn" <dk at artimi dot com>
- To: "'Bob Rossi'" <bob at brasko dot net>
- Cc: "'Eli Zaretskii'" <eliz at gnu dot org>,<gdb at sources dot redhat dot com>
- Date: Thu, 7 Oct 2004 13:48:04 +0100
- Subject: RE: probing GDB for MI versions
> -----Original Message-----
> From: 'Bob Rossi'
> Sent: 07 October 2004 13:36
> > Yes, I can, but I'm not going to do it for you. Here's a
> hint, in shell
> > terms:
> >
> > echo "-mi-version" | gdb | grep "Highest supported MI
> version is" | ....
> >
> > [you have to fill in the ... with some kind of sed or awk command]
> OK, I agree with this. Why would we add this functionality as
> an MI command
> if the front ends all have to write some adhoc parser to get the
> information?
You use the term "adhoc parser" as if that were a bad thing. It's not.
It's an entirely reasonable way for a computer program to parse some data
and extract some simple information that it requires.
> So, I agree that it can be done, I just think it's a terrible idea.
> We can do it in a much better way.
This is an invalid argument. You'll have to have *some* kind of 'parsing'
going on in order to interpret the output from gdb that lists the versions
of MI, no matter whether it's an MI command or a command-line option or
anything else. So why you think one of those ways is terrible and the other
is not, on the basis of this requirement, which is in fact the same in both
cases anyway, I just don't see.
cheers,
DaveK
--
Can't think of a witty .sigline today....