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


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


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