This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: probing GDB for MI versions
On Thu, Oct 07, 2004 at 10:04:29AM +0100, Dave Korn wrote:
> > -----Original Message-----
> > From: 'Bob Rossi' [mailto:bob@brasko.net]
> > Sent: 06 October 2004 18:51
>
> > Dave, can you write a piece of code that can take all of the output of
> > GDB, from when it starts until after it exists (only given this new MI
> > command), and return to me the currently supported interfaces?
>
> 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]
>
> > Will this code work with MI5, MI6 and MI7. Since it is likely
> > that there will be syntax changes?
>
> As long as the body text of that string that you blindly search for
> remains the same, yes it will.
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?
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.
Bob Rossi